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]

Re: arm-wince-pe-ld: "bl" addresses off by 8


Hi Craig,

> This is the cause of the incorrect "bl" addresses.  I changed this to
> 
>       /* cav: the following apparently should not be here */
> #if 0
> #ifdef ARM_WINCE
>       /* MS ARM-CE makes the reloc relative to the opcode's pc, not
> 	 the next opcode's pc, so is off by one.  */
>       if (howto->pc_relative && !info->relocateable)
> 	addend -= 8;
> #endif
> #endif

Thanks for reporting this.  I have applied the patch below to the
current sources.

Cheers
        Nick

2002-12-21  Nick Clifton  <nickc@redhat.com>

	* coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
	that subtracted 8 from pc relative relocations.

Index: coff-arm.c
===================================================================
RCS file: /cvs/src/src/bfd/coff-arm.c,v
retrieving revision 1.40
diff -c -3 -p -w -r1.40 coff-arm.c
*** coff-arm.c	30 Nov 2002 08:39:35 -0000	1.40
--- coff-arm.c	21 Dec 2002 02:18:28 -0000
*************** coff_arm_relocate_section (output_bfd, i
*** 1281,1288 ****
--- 1281,1291 ----
  #ifdef ARM_WINCE
        /* MS ARM-CE makes the reloc relative to the opcode's pc, not
  	 the next opcode's pc, so is off by one.  */
+ #if 0 /* This appears to have been true for WINCE 2.0, but it is not
+ 	 true for WINCE 3.0.  */
        if (howto->pc_relative && !info->relocateable)
  	addend -= 8;
+ #endif
  #endif
  
        /* If we are doing a relocateable link, then we can just ignore



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