This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix fatal typo in bfd/elf32-xtensa.c
- From: Bob Wilson <bwilson at tensilica dot com>
- To: binutils at sources dot redhat dot com
- Cc: eager at mvista dot com, joe at tensilica dot com
- Date: Tue, 23 Sep 2003 13:31:10 -0700
- Subject: fix fatal typo in bfd/elf32-xtensa.c
- Organization: Tensilica, Inc.
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)
{