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: R_ARC_B22_PCREL relocs busted?


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


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