diff options
author | Alan Modra <amodra@gmail.com> | 2003-05-17 06:16:03 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-05-17 06:16:03 +0000 |
commit | 9c7a29a32e738b51793f7f2bcaa4b403373b478c (patch) | |
tree | a925e4ef543194e6e886f4cb4ba54819d59cb067 /bfd/elf32-i386.c | |
parent | b8b527c5a96aec839f5c8122ffd08556f7fe0d9f (diff) | |
download | gdb-9c7a29a32e738b51793f7f2bcaa4b403373b478c.zip gdb-9c7a29a32e738b51793f7f2bcaa4b403373b478c.tar.gz gdb-9c7a29a32e738b51793f7f2bcaa4b403373b478c.tar.bz2 |
* elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
to trim plt entries. Move undefweak non-default visibility test..
(allocate_dynrelocs): ..from here.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
dynamic_sections_created here. Update comment. Move undefweak
non-default visibility test..
(allocate_dynrelocs): ..from here. Fix comment.
* elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
to trim plt entries. Move undefweak non-default visibility test..
(allocate_dynrelocs): ..from here. Fix comment.
* elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
STV_DEFAULT rather than comparing with zero.
* elflink.c (_bfd_elf_merge_symbol): Likewise.
(_bfd_elf_fix_symbol_flags): Likewise. Format comment.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r-- | bfd/elf32-i386.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index b1a441a..cfcb7b3 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -1390,11 +1390,9 @@ elf_i386_adjust_dynamic_symbol (info, h) || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0) { if (h->plt.refcount <= 0 - || (! info->shared - && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0 - && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0 - && h->root.type != bfd_link_hash_undefweak - && h->root.type != bfd_link_hash_undefined)) + || SYMBOL_CALLS_LOCAL (info, h) + || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT + && h->root.type == bfd_link_hash_undefweak)) { /* This case can occur if we saw a PLT32 reloc in an input file, but the symbol was never referred to by a dynamic @@ -1558,9 +1556,7 @@ allocate_dynrelocs (h, inf) htab = elf_i386_hash_table (info); if (htab->elf.dynamic_sections_created - && h->plt.refcount > 0 - && (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - || h->root.type != bfd_link_hash_undefweak)) + && h->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ |