[PATCH] S12Z: Emit RELOC_S12Z_OPR instead of RELOC_EXT24 where appropriate.

Nick Clifton nickc@redhat.com
Wed Jan 16 11:46:00 GMT 2019


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



More information about the Binutils mailing list