This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
RE: R_ARC_B22_PCREL relocs busted?
- To: 'Nick Clifton' <nickc at cambridge dot redhat dot com>
- Subject: RE: R_ARC_B22_PCREL relocs busted?
- From: Andre Paquette <APaquette at Catena dot com>
- Date: Tue, 2 Oct 2001 14:34:30 -0400
- Cc: "'binutils at sourceware dot cygnus dot com '" <binutils at sourceware dot cygnus dot com>
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