[PATCH] S12Z: Emit RELOC_S12Z_OPR instead of RELOC_EXT24 where appropriate.
John Darrington
john@darrington.wattle.id.au
Wed Jan 16 13:20:00 GMT 2019
On Wed, Jan 16, 2019 at 11:45:23AM +0000, Nick Clifton wrote:
Hi John,
> bfd/
> * bfd-in2.h [BFD_RELOC_S12Z_OPR]: New reloc.
> * libbfd.h (bfd_relocl_code_real_names)[BFD_REOLOC_S12Z_OPR]: New
> entry.
Note - since libbfd.h is a generated file you could simply have:
* libbfd.h: Regenerate.
> * elf32-s12z.c (eld_s12z_howto_table): R_S12Z_OPR takes non zero
> source field. (md_apply_fix): Apply final fix
> to BFD_RELOC_S12Z_OPR.
> * reloc.c[BFD_RELOC_S12Z_OPR]: New reloc.
>
> gas/
> * config/tc-s12z.c (emit_opr): Emit BFD_RELOC_S12Z_OPR instead of
> BFD_RELOC_24.
> * testsuite/gas/s12z/opr-indirect-expr.d: Expect R_S12Z_OPR instead
> of R_S12Z_EXT24.
Approved - please apply.
> + /* Some third party tools seem to use the lower bits
> + of this addend for flags. They don't get added
> + to the final location. The purpose of these flags
> + is not known. We simply set it to zero. */
> + fix->fx_addnumber = 0x00;
That sounds a bit naughty. (Of the third party tools that is).
Is this likely to cause problems in the future ?
It means that 3rd party linkers may have problems linking gas generated
elf files. But the binutils linker can still link against 3rd party
generated elf files.
J'
--
Avoid eavesdropping. Send strong encrypted email.
PGP Public key ID: 1024D/2DE827B3
fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
See http://sks-keyservers.net or any PGP keyserver for public key.
More information about the Binutils
mailing list