ARM-software / abi-aa

Application Binary Interface for the Arm® Architecture
Other
878 stars 173 forks source link

[PAUTHABIELF64] Add R_AARCH64_AUTH_GOT_ADR_PREL_LO21 relocation #259

Closed smithp35 closed 2 weeks ago

smithp35 commented 2 months ago

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_PREL21LO21 for this purpose following the naming convention of R_ADR_PREL_LO21. which is its closest equivalent.

asl commented 2 weeks ago

We double checked and aligned all names in the implementation according to the spec (see https://github.com/llvm/llvm-project/pull/96158/commits/029ba553bda1520d2c2cae8d2c1fae152972d088)

smithp35 commented 2 weeks ago

Thanks for the confirmation.