R_ARC_B22_PCREL relocs busted?

Andre Paquette APaquette@Catena.com
Tue Oct 2 11:41:00 GMT 2001


Looks good.  Thanks for diving into this.

Cheers,

Andre

-----Original Message-----

Hi Andre,

 [Sorry about the delay in replying].

> Note that if you just re-link the original objects after patching
> binutils, the problem appears to go away.  If you both re-assemble
> and re-link, it comes out looking like what I've got above.

Yes you are right.  In the end I have gone back to the patch that you
supplied and applied a variant of it. (See below).  The only real
change I made was to add an explanatory comment and to have the new
function call bfd_elf_generic_reloc() rather than incorporating the
code from that function into this function.  That way if the code in
elf.c changes you will not need to update this function.

I think that basically there is a bug in bfd_install_relocation /
bfd_perform_relocation with regard to the handling of the pcrel_offset
field.  Changing them however is not a good idea, as they are generic
functions and they are used by lots of ports.  So instead using a
special handler function is this simplest workaround.

Cheers
        Nick



More information about the Binutils mailing list