This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Problem with relocation records (PowerPC)
- To: Paul Mikell <pmikell at rare dot co dot uk>
- Subject: Re: Problem with relocation records (PowerPC)
- From: Alan Modra <alan at linuxcare dot com dot au>
- Date: Fri, 2 Feb 2001 15:42:40 +1100 (EST)
- cc: Binutils Mailing List <binutils at sources dot redhat dot com>
On Thu, 1 Feb 2001, Paul Mikell wrote:
> 28: 80 60 00 00 lwz r3,0(r0)
> 2a: R_PPC_EMB_SDA21 __DBInterface
Whatever generated this violates the PPC processor specific ABI
"Relocation entries apply to halfwords or words. In either case, the
r_offset value designates the offset or virtual address of the first byte
of the affected storage unit. The relocation type specifies which bits to
change and how to calculate their values."
R_PPC_EMB_SDA21 changes 21 bits (5 register bits + 16 offset bits), so it
falls into the class of relocs that apply to words. ie. the GNU tools are
correct to place the offset at the start of the instruction.
> instruction? If the latter, is there a tool for adjusting the addresses of
> relocation records in pre-compiled libraries?
Not that I'm aware of. You could always write one. There's plenty of
example code to handle reading and writing of relocs in bfd/
Alan Modra
--
Linuxcare.