This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix fatal typo in bfd/elf32-xtensa.c


I finally succeeded in building glibc for an Xtensa system with a recent 
version of binutils.....and discovered that it is totally broken.  The 
problem is simple.  I had accidentally typed "=" when I meant "+=".  The 
symptom of this is that most of the dynamic relocation offsets are set to the 
same value.  I've tested this patch, and it fixes the problem.  Committed on 
the mainline.

The problem also exists on the 2.14 branch.  If there is another release off 
the 2.14 branch, I'll apply the patch over there.  Otherwise, and in the 
meantime, anyone working with 2.14 for Xtensa targets will need to apply this 
patch themselves.

2003-09-23  Bob Wilson  <bob.wilson@acm.org>

	* elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
	dynamic relocation offsets.


Index: elf32-xtensa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-xtensa.c,v
retrieving revision 1.12
diff -u -r1.12 elf32-xtensa.c
--- elf32-xtensa.c	23 Sep 2003 00:40:49 -0000	1.12
+++ elf32-xtensa.c	23 Sep 2003 20:20:43 -0000
@@ -2081,8 +2081,8 @@
 		memset (&outrel, 0, sizeof outrel);
 	      else
 		{
-		  outrel.r_offset = (input_section->output_section->vma
-				     + input_section->output_offset);
+		  outrel.r_offset += (input_section->output_section->vma
+				      + input_section->output_offset);
 
 		  if (dynamic_symbol)
 		    {

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]