This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][BINUTILS][AARCH64] Add support for pointer authentication B key

Hi Sam,

> binutils/ChangeLog:
> 2018-12-11  Sam Tebbs  <>
>      * dwarf.c (read_cie):  Add check for 'B'.
> gas/ChangeLog:
> 2018-12-11  Sam Tebbs  <>
>      * config/tc-aarch64.h (enum pointer_auth_key,
>      tc_fde_entry_extras, tc_cie_entry_extras, tc_fde_entry_init_extra,
>      tc_output_cie_extra, tc_cie_fde_equivalent_extra, 
> tc_cie_entry_init_extra):
>      Define.
>      * dw2gencfi.c (struct cie_entry): Add tc_cie_entry_extras invocation.
>      (alloc_fde_entry, select_cie_for_fde): Add tc_fde_entry_init_extra
>      invocation.
>      (output_cie): Add tc_output_cie_extra invocation.
>      (select_cie_for_fde): Add tc_cie_fde_equivalent_extra invocation.
>      * dw2gencfi.h (enum pointer_auth_key): Move to config/tc-aarch64.h.
>      (struct fde_entry): Add tc_fde_entry_extras invocation

Approved (again :-).

One thing did catch my eye:

+#define tc_output_cie_extra(cie) if (cie->pauth_key == AARCH64_PAUTH_KEY_B) \
+			      out_one ('B');

Normally this would be written as:

#define tc_output_cie_extra(cie) \
  do \
    { \
      if (cie->pauth_key == AARCH64_PAUTH_KEY_B) \
        out_one ('B'); \
    } \
  while (0)

(Note - no semi-colon at the end).

I could not think of a sceanario where your version would cause problems,
but I thought that you ought to know about the (unofficial) convention,


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]