This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
[committed] Fix ld segfault on hppa-unknown-linux-gnu
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: binutils at sources dot redhat dot com
- Date: Fri, 17 Oct 2003 12:46:01 -0400 (EDT)
- Subject: [committed] Fix ld segfault on hppa-unknown-linux-gnu
This fixes a segfaulted encounter linking libjava on hppa-unknown-linux-gnu.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
output section has been discarded.
Index: elf32-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-hppa.c,v
retrieving revision 1.105
diff -u -3 -p -r1.105 elf32-hppa.c
--- elf32-hppa.c 10 Sep 2003 18:46:08 -0000 1.105
+++ elf32-hppa.c 15 Oct 2003 21:51:19 -0000
@@ -3739,6 +3739,11 @@ elf32_hppa_relocate_section (bfd *output
&& sym_sec->output_section != NULL
&& ! bfd_is_abs_section (sym_sec))
{
+ /* Skip this relocation if the output section has
+ been discarded. */
+ if (bfd_is_abs_section (sym_sec->output_section))
+ break;
+
indx = elf_section_data (sym_sec->output_section)->dynindx;
/* We are turning this relocation into one
against a section symbol, so subtract out the