[committed] Fix ld segfault on hppa-unknown-linux-gnu

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Oct 17 16:46:00 GMT 2003


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



More information about the Binutils mailing list