From 12ca746df4b2fb67d3cc566005f00fac2fe1de7a Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Tue, 2 Apr 2024 18:22:09 +0100 Subject: [PATCH 1/2] [pauthabielf64] Fix typo in relocation name As pointed out in https://github.com/ARM-software/abi-aa/issues/253 the R_AARCH64_AUTH_GOT_LO12_NC is meant to be the AUTH variant of R_AARCH64_LD64_GOT_LO12_NC. As there is also a R_AARCH64_LD32_GOT_LO12_NC relocation rename the relocation to R_AARCH64_LD64_AUTH_GOT_LO12_NC. These relocations are in the appendix as we are currently expecting the GOT to be RELRO and unsigned in most signing schemas. --- pauthabielf64/pauthabielf64.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pauthabielf64/pauthabielf64.rst b/pauthabielf64/pauthabielf64.rst index 65b2e1b..2bf32f6 100644 --- a/pauthabielf64/pauthabielf64.rst +++ b/pauthabielf64/pauthabielf64.rst @@ -1153,7 +1153,7 @@ The GOT entries must be relocated by AUTH variant dynamic relocations. | | | | check that –2\ :sup:`32` | | | | | <= X < 2\ :sup:`32` | +-------------+----------------------------------------+----------------------------------+--------------------------+ - | 0x811A | R\_AARCH64\_AUTH\_GOT\_LO12_NC | G(ENCD(GDAT(S + A))) | Set the LD/ST immediate | + | 0x811A | R\_AARCH64\_AUTH\_LD64\_GOT\_LO12_NC | G(ENCD(GDAT(S + A))) | Set the LD/ST immediate | | | | | field to bits [11:3] of | | | | | X. No overflow check; | | | | | check that X&7 = 0 | From c8a6c5d30033c561d5ab9fa90333226987e91360 Mon Sep 17 00:00:00 2001 From: Peter Smith Date: Wed, 3 Apr 2024 08:54:36 +0100 Subject: [PATCH 2/2] [pauthabi64] Add note for RAARCH64_AUTH_GOT_ADD_LO12_NC There is no equivalent for this relocation in the standard ABI it is used by runtime code to calculate the address of a GOT slot so it can be used as one of the inputs to an authenticate instruction. Add a note that this matches up with the :got_auth_lo12: operator for future reference. Part of https://github.com/ARM-software/abi-aa/issues/253 --- pauthabielf64/pauthabielf64.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pauthabielf64/pauthabielf64.rst b/pauthabielf64/pauthabielf64.rst index 2bf32f6..c8308af 100644 --- a/pauthabielf64/pauthabielf64.rst +++ b/pauthabielf64/pauthabielf64.rst @@ -1167,7 +1167,6 @@ The GOT entries must be relocated by AUTH variant dynamic relocations. | | | | value to bits [11:0] of | | | | | X. No overflow check. | +-------------+----------------------------------------+----------------------------------+--------------------------+ - .. raw:: pdf PageBreak @@ -1181,7 +1180,9 @@ is the PAuth ABI equivalent of ``R_AARCH64_RELATIVE``. The underlying calculation performed by the dynamic linker is the same, the only difference is that the resulting pointer is signed. The dynamic linker reads the signing schema from the contents of the place of the dynamic -relocation. +relocation. The ``R_AARCH64_AUTH_GOT_ADD_LO12_NC`` relocation is an +addition for the PAuth ABI and has no equivalent in (AAELF64_). It is +used with the ``:got_auth_lo12:`` operator on an add instruction. .. table:: Additional AUTH Dynamic relocations