forked from Imagelibrary/binutils-gdb
* elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
boolean param. (_bfd_elf_link_hash_hide_symbol): Likewise. * elflink.h (elf_link_add_object_symbols): Adjust call to elf_backend_hide_symbol. (elf_fix_symbol_flags): Likewise. (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather than bfd_alloc. * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param. Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref. * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. (clobber_millicode_symbols): Adjust to suit new hide_symbol. * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param and adjust to suit. * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call _bfd_elf_link_hash_hide_symbol rather than duplicating code. * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
This commit is contained in:
19
bfd/elf.c
19
bfd/elf.c
@@ -1286,14 +1286,23 @@ _bfd_elf_link_hash_copy_indirect (dir, ind)
|
||||
}
|
||||
|
||||
void
|
||||
_bfd_elf_link_hash_hide_symbol (info, h)
|
||||
struct bfd_link_info *info ATTRIBUTE_UNUSED;
|
||||
_bfd_elf_link_hash_hide_symbol (info, h, force_local)
|
||||
struct bfd_link_info *info;
|
||||
struct elf_link_hash_entry *h;
|
||||
boolean force_local;
|
||||
{
|
||||
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
|
||||
h->plt.offset = (bfd_vma) -1;
|
||||
if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
|
||||
h->dynindx = -1;
|
||||
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
|
||||
if (force_local)
|
||||
{
|
||||
h->elf_link_hash_flags |= ELF_LINK_FORCED_LOCAL;
|
||||
if (h->dynindx != -1)
|
||||
{
|
||||
h->dynindx = -1;
|
||||
_bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,
|
||||
h->dynstr_index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize an ELF linker hash table. */
|
||||
|
||||
Reference in New Issue
Block a user