mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-26 05:47:26 +08:00
* elflink.h: Formatting fixes.
(elf_link_output_extsym): Merge undefined and undef weak cases.
This commit is contained in:
@ -1,5 +1,8 @@
|
|||||||
2002-03-13 Alan Modra <amodra@bigpond.net.au>
|
2002-03-13 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elflink.h: Formatting fixes.
|
||||||
|
(elf_link_output_extsym): Merge undefined and undef weak cases.
|
||||||
|
|
||||||
* elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
|
* elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
|
||||||
when word size of input matches output word size.
|
when word size of input matches output word size.
|
||||||
|
|
||||||
|
@ -6029,10 +6029,6 @@ elf_link_output_extsym (h, data)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
case bfd_link_hash_undefined:
|
case bfd_link_hash_undefined:
|
||||||
input_sec = bfd_und_section_ptr;
|
|
||||||
sym.st_shndx = SHN_UNDEF;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case bfd_link_hash_undefweak:
|
case bfd_link_hash_undefweak:
|
||||||
input_sec = bfd_und_section_ptr;
|
input_sec = bfd_und_section_ptr;
|
||||||
sym.st_shndx = SHN_UNDEF;
|
sym.st_shndx = SHN_UNDEF;
|
||||||
@ -8219,7 +8215,8 @@ elf_bfd_discard_info (output_bfd, info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
stab = strip ? NULL : bfd_get_section_by_name (abfd, ".stab");
|
stab = strip ? NULL : bfd_get_section_by_name (abfd, ".stab");
|
||||||
if ((! stab || elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS)
|
if ((! stab
|
||||||
|
|| elf_section_data(stab)->sec_info_type != ELF_INFO_TYPE_STABS)
|
||||||
&& ! eh
|
&& ! eh
|
||||||
&& (strip || ! bed->elf_backend_discard_info))
|
&& (strip || ! bed->elf_backend_discard_info))
|
||||||
continue;
|
continue;
|
||||||
@ -8307,8 +8304,7 @@ elf_bfd_discard_info (output_bfd, info)
|
|||||||
cookie.relend = NULL;
|
cookie.relend = NULL;
|
||||||
if (eh->reloc_count)
|
if (eh->reloc_count)
|
||||||
cookie.rels = (NAME(_bfd_elf,link_read_relocs)
|
cookie.rels = (NAME(_bfd_elf,link_read_relocs)
|
||||||
(abfd, eh, (PTR) NULL,
|
(abfd, eh, (PTR) NULL, (Elf_Internal_Rela *) NULL,
|
||||||
(Elf_Internal_Rela *) NULL,
|
|
||||||
info->keep_memory));
|
info->keep_memory));
|
||||||
if (cookie.rels)
|
if (cookie.rels)
|
||||||
{
|
{
|
||||||
@ -8337,9 +8333,7 @@ elf_bfd_discard_info (output_bfd, info)
|
|||||||
free (freesyms);
|
free (freesyms);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ehdr
|
if (ehdr && _bfd_elf_discard_section_eh_frame_hdr (output_bfd, info, ehdr))
|
||||||
&& _bfd_elf_discard_section_eh_frame_hdr (output_bfd,
|
|
||||||
info, ehdr))
|
|
||||||
ret = true;
|
ret = true;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -8348,6 +8342,8 @@ static boolean
|
|||||||
elf_section_ignore_discarded_relocs (sec)
|
elf_section_ignore_discarded_relocs (sec)
|
||||||
asection *sec;
|
asection *sec;
|
||||||
{
|
{
|
||||||
|
struct elf_backend_data *bed;
|
||||||
|
|
||||||
switch (elf_section_data (sec)->sec_info_type)
|
switch (elf_section_data (sec)->sec_info_type)
|
||||||
{
|
{
|
||||||
case ELF_INFO_TYPE_STABS:
|
case ELF_INFO_TYPE_STABS:
|
||||||
@ -8356,10 +8352,10 @@ elf_section_ignore_discarded_relocs (sec)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((get_elf_backend_data (sec->owner)->elf_backend_ignore_discarded_relocs
|
|
||||||
!= NULL)
|
bed = get_elf_backend_data (sec->owner);
|
||||||
&& (*get_elf_backend_data (sec->owner)
|
if (bed->elf_backend_ignore_discarded_relocs != NULL
|
||||||
->elf_backend_ignore_discarded_relocs) (sec))
|
&& (*bed->elf_backend_ignore_discarded_relocs) (sec))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user