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]

Change to coff-arm.c breaks binutils


Hello everyone,

It's been a while since I've been on this list or done anything with the
binutils source, but I've been doing work with a strongarm processor and
finally wanted to use the latest cvs sources for binutils instead of
2.10.

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>

Sean



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