aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-04-30 16:13:26 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-04-30 16:13:26 +0000
commit5fba655aed6c897750c2a9c88467b1691b8ec481 (patch)
tree5f3ea805408b8b31de47495c6407a9483ad9defb /bfd/elf.c
parentdb20fd76547e0c6e7f73969bbeec15e3d83a182e (diff)
downloadgdb-5fba655aed6c897750c2a9c88467b1691b8ec481.zip
gdb-5fba655aed6c897750c2a9c88467b1691b8ec481.tar.gz
gdb-5fba655aed6c897750c2a9c88467b1691b8ec481.tar.bz2
2000-04-27 H.J. Lu <hjl@gnu.org>
* elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1 only for ELF_LINK_FORCED_LOCAL. * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise. * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise. * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise. * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL if the symbol has hidden or internal visibility.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 26ce9d3..602ebcd 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1014,8 +1014,9 @@ _bfd_elf_link_hash_hide_symbol (info, h)
struct elf_link_hash_entry *h;
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- h->dynindx = -1;
h->plt.offset = (bfd_vma) -1;
+ if ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
+ h->dynindx = -1;
}
/* Initialize an ELF linker hash table. */