powerpc64-linux infrastructure 5 of 6
Torbjorn Granlund
tege@swox.com
Wed Aug 8 13:55:00 GMT 2001
Geoff Keating <geoffk@geoffk.org> writes:
> Put relocs in the opcode table.
This seems like a bad design. The opcode table is shared between
multiple ABIs and object file formats, and there's no reason to think
that the reloc for an instruction in aix-xcoff would be the same as
the one in powerpc SVR4. For instance,
/* The D field in a D form instruction. This is a displacement off
a register, and implies that the next operand is a register in
parentheses. */
#define D CR + 1
- { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+ { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED,
+ BFD_RELOC_PPC_TOC16 },
seems specific to the AIX and powerpc64 ABIs.
Yes, that field is only used for AIX / XCOFF.
It replaces an ugly chunk of ad-hoc code in tc-ppc.c.
Why do you think it is bad design?
--
Torbjörn
More information about the Binutils
mailing list