[PATCH] S12Z: Rename reloc R_S12Z_UKNWN_3 to R_S12Z_EXT18 and implement according to recently inferred information about this reloc.

Nick Clifton nickc@redhat.com
Mon Aug 20 14:10:00 GMT 2018


Hi John,

> * bfd/elf32-s12z.c: (opru18_reloc): New function.
> * bfd/elf32-s12z.c: (elf_s12z_howto_table): Adjust Howto according to new knowledge.
> * include/elf/s12z.h: Rename R_S12Z_UKNWN_3 to R_S12Z_EXT18.

Being picky here, but please could you resubmit the patch with the following fixed:


> diff --git a/bfd/ChangeLog b/bfd/ChangeLog
> index 4fbe0bf6bd..4621c23621 100644

Please don't include the ChangeLogs as context diffs.  They almost
never apply cleanly.  Instead just plain text is fine.

> +{
> +  /* This reloc is used for 18 bit General Operand Addressing Postbyte in the
> +     INST opru18 form.  This is an 18 bit reloc, but the most significant bit
> +     is shifted one place to the left of where it would normally be.  See
> +     Appendix A.4 of the S12Z reference manual. */

Comment formatting.  Two spaces at the end of the comment, before the closing
*/  (pedantic I know, but it does help to keep the code base consistent).

> +  /* Keep the wanted bits and discard the rest */

Also please end comments with a full stop before the two spaces...

> +  bfd_vma val = bfd_asymbol_value (symbol);

Can you put variable declarations at the start of the containing block please ?

It would also be nice if there was a test case to check the processing of this
reloc....  (Adding one is not necessary to have this patch approved, but it is
worth thinking about).

Cheers
  Nick




More information about the Binutils mailing list