[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: binutils 2.11(.2): ARM relocation problem in linker
From: |
Nick Clifton |
Subject: |
Re: binutils 2.11(.2): ARM relocation problem in linker |
Date: |
01 Aug 2001 16:16:10 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Hi Eberhard,
> Binutils version: 2.11 and 2.11.2
> Configuration: --target=arm-epoc-pe (PE/COFF)
>
> For branches between different .text* sections (C++ templates and
> .linkonce discard!), ld computes wrong target addresses as shown by
> this sample code:
Thanks for reporting this bug. It had already been fixed for the
arm-vxworks target but not the arm-epoc-pe target. I am applying the
patch below to add the fix for arm-epoc-pe. At some point I will try
testing the other arm targets to see if they are affected as well.
Cheers
Nick
2001-08-01 Nick Clifton <address@hidden>
* config.bfd (arm-vxworks): Change name of define from VXWORKS to
ARM_COFF_BUGFIX.
(arm-epoc-pe): Define ARM_COFF_BUGFIX.
coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
ARM_COFF_BUGFIX.
Index: config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.60
diff -p -r1.60 config.bfd
*** config.bfd 2001/06/08 06:21:29 1.60
--- config.bfd 2001/08/01 15:13:08
*************** case "${targ}" in
*** 120,125 ****
--- 120,126 ----
targ_defvec=arm_epoc_pe_little_vec
targ_selvecs="arm_epoc_pe_little_vec arm_epoc_pe_big_vec
arm_epoc_pei_little_vec arm_epoc_pei_big_vec"
targ_underscore=no
+ targ_cflags=-DARM_COFF_BUGFIX
;;
arm-wince-pe | arm-*-wince)
targ_defvec=armpe_little_vec
*************** case "${targ}" in
*** 144,150 ****
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
! targ_cflags=-DVXWORKS
;;
arm-*-coff)
targ_defvec=armcoff_little_vec
--- 145,151 ----
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
! targ_cflags=-DARM_COFF_BUGFIX
;;
arm-*-coff)
targ_defvec=armcoff_little_vec
Index: coff-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-arm.c,v
retrieving revision 1.27
diff -p -r1.27 coff-arm.c
*** coff-arm.c 2001/04/27 17:12:17 1.27
--- coff-arm.c 2001/08/01 15:13:12
*************** coff_arm_relocate_section (output_bfd, i
*** 1246,1255 ****
continue;
/* FIXME - it is not clear which targets need this next test
and which do not. It is known that it is needed for the
! VXworks target (hence the #ifdef), but it is also known
! that it was supressed for other (arm) targets. This ought
! to be sorted out one day. */
! #ifdef VXWORKS
/* We must not ignore the symbol value. If the symbol is
within the same section, the relocation should have already
been fixed, but if it is not, we'll be handed a reloc into
--- 1246,1255 ----
continue;
/* FIXME - it is not clear which targets need this next test
and which do not. It is known that it is needed for the
! VxWorks and EPOC-PE targets, but it is also known that it
! was supressed for other ARM targets. This ought to be
! sorted out one day. */
! #ifdef ARM_COFF_BUGFIX
/* We must not ignore the symbol value. If the symbol is
within the same section, the relocation should have already
been fixed, but if it is not, we'll be handed a reloc into
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: binutils 2.11(.2): ARM relocation problem in linker,
Nick Clifton <=