abi-aa icon indicating copy to clipboard operation
abi-aa copied to clipboard

[PAUTHABIELF64] Add R_AARCH64_AUTH_GOT_ADR_PREL_LO21 relocation

Open smithp35 opened this issue 10 months ago • 0 comments

With the tiny code model and a signed GOT, an adr instruction is needed to get the address of the GOT entry for input to the authenication. For example:

adr x8, :got_auth: symbol ldr x0, [x8] // Authenticate to get unsigned pointer autia x0, x8

The adr requires a new relocation code where there isn't a direct equivalent in the main ABI as there is not need to take the address of the GOT slot when no authentication is required.

We define R_AARCH64_AUTH_GOT_ADR_PREL21_LO21 for this purpose following the naming convention of R_<CLS>_ADR_PREL_LO21. which is its closest equivalent.

smithp35 avatar Apr 22 '24 14:04 smithp35