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]

Re: Change to coff-arm.c breaks binutils


Hi Sean,

> The following entry in the ChangeLog for the BFD breaks relocs for my
> final link:
> 
> 2000-07-04  Alexandre Oliva  <aoliva@redhat.com>
> 
> 	* coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
> 	value of PC-relative offsets.
> 
> 
> The target is arm-wrs-vxworks and the code in question is...
> 
> #if 0  /* 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
> 	  the beginning of the symbol's section, so we must not cancel
> 	  out the symbol's value, otherwise we'll be adding it in
> 	  twice.  */
>           if (sym != NULL && sym->n_scnum != 0)
>             addend += sym->n_value;
> #endif
> 
> If I change this to an #if 1, then all is well.  Can someone review and
> fix?  With this code fragment removed, many of my relocs are at a fixed
> address as opposed to the proper location.
> 
> for instance,
> 
>      1608:	ebfffe7c 	bl	1000 <STACK_REDZONE_NATIVE>
> 
> instead of the proper
> 
>      1608:	eb06dbd1 	bl	1b8554 <___divsi3>

Interesting - there does not appear to be any entry in the mail
archive explaining what problem Alexandre's patch was trying to fix. 

Alexandre has suggested that maybe this is something that needs to
conditionally enabled, depending upon the target.  Looking at
config.bfd there does not appear to be support for an arm-wrs-vxworks
target, so maybe one ought to be added ?  [What binutils target are
you currently using, just arm-coff ?]

Cheers
        Nick


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