This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] S12Z: Emit RELOC_S12Z_OPR instead of RELOC_EXT24 where appropriate.
- From: Nick Clifton <nickc at redhat dot com>
- To: John Darrington <john at darrington dot wattle dot id dot au>, binutils at sourceware dot org
- Date: Wed, 16 Jan 2019 11:45:23 +0000
- Subject: Re: [PATCH] S12Z: Emit RELOC_S12Z_OPR instead of RELOC_EXT24 where appropriate.
- References: <20190115184736.23636-1-john@darrington.wattle.id.au>
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 ?
Cheers
Nick