elf backend hide_symbol bug
Alan Modra
amodra@bigpond.net.au
Fri Aug 13 08:34:00 GMT 2004
See http://sources.redhat.com/bugzilla/show_bug.cgi?id=293 for my
analysis of this problem. mips, cris, xtensa maintainers should
note that there may be a similar problem for their ports. The
backend hide_symbol functions can be called when the plt and got
unions are used as refcounts, eg. from bfd_elf_link_add_symbols,
and also when the field may be used as an offset/pointer, eg. from
_bfd_elf_adjust_dynamic_symbol.
PR 293
* elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
"zero" the plt field.
Index: bfd/elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.119
diff -u -p -r1.119 elf32-hppa.c
--- bfd/elf32-hppa.c 13 Aug 2004 03:15:57 -0000 1.119
+++ bfd/elf32-hppa.c 13 Aug 2004 08:14:37 -0000
@@ -1623,7 +1623,7 @@ elf32_hppa_hide_symbol (struct bfd_link_
if (! ((struct elf32_hppa_link_hash_entry *) h)->plabel)
{
h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- h->plt.offset = (bfd_vma) -1;
+ h->plt = elf_hash_table (info)->init_refcount;
}
}
--
Alan Modra
IBM OzLabs - Linux Technology Centre
More information about the Binutils
mailing list