ELF for PPC32
Torbjorn Granlund
tege@swox.com
Mon Mar 12 14:57:00 GMT 2001
While working on implementing the 64-bit ELF ABI for PowerPC, we
obsevered a discrepancy between the 64-bit ABI and how the 32-bit ABI
is actually implemented in gas/config/tc-ppc.c and in bfd/elf32-ppc.c.
The discrepancy is in the relocation address of R_PPC_ADDR14,
R_PPC_REL14. The 64-bit ABI states:
Relocation entries apply to halfwords, words, or doublewords. In
all cases, the r_offset value designates the offset or virtual
address of the first byte of the affected storage unit.
The current 32-bit implementation doesn't do like that for
R_PPC_ADDR14 and R_PPC_REL14. It uses the address of the first byte
of the instruction, which isn't the same thing (except for under
little-endian mode).
We suspect this to be a bug in the implementation, since it seems
strange that the 64-bit ABI and the 32-bit ABI should be inconsistent
in this respect.
Can somebody please confirm this?
Is the 32-bit PPC ABI available for download?
--
Torbjörn
More information about the Binutils
mailing list