[committed] Don't create opd for undefined weak symbols
John David Anglin
dave@hiauly1.hia.nrc.ca
Sat Mar 18 19:21:00 GMT 2006
I started trying to get gcc and ld working together on hppa64-hp-hpux11*.
The new dwarf2 exception support in gcc requires support for undefined
weak symbols in shared libraries. Trying to create an opd for an
undefined symbol causes a segmentation fault. Thus, the enclosed change.
Tested on hppa64-hpux11.11 with no regressions.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2006-03-18 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf64-hppa.c (allocate_global_data_opd): Don't create an OPD entry
for undefined weak symbols.
Index: elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.68
diff -u -r1.68 elf64-hppa.c
--- elf64-hppa.c 16 Mar 2006 12:20:15 -0000 1.68
+++ elf64-hppa.c 18 Mar 2006 00:36:43 -0000
@@ -1129,6 +1129,7 @@
/* We never need an opd entry for a symbol which is not
defined by this output file. */
if (h && (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak
|| h->root.u.def.section->output_section == NULL))
dyn_h->want_opd = 0;
More information about the Binutils
mailing list