Closed kovdan01 closed 2 months ago
Tagging @asl
Thanks for reporting. I guess that this would take the example for the small code-model
adrp x8, :got_auth: symbol
add x8, x8, :got_auth_lo12: symbol
ldr x0, [x8]
// Authenticate to get unsigned pointer
autia x0, x8
And use something like
adr x8, :got_auth: symbol // Needs new relocation like R_AARCH64_GOT_ADR_PREL21
ldr x0, [x8]
// Authenticate to get unsigned pointer
autia x0, x
I'd probably use R_AARCH64_AUTH_GOT_ADR_PREL_LO21
to follow the convention set by R_<CLS>_ ADR_PREL_LO21
Will hopefully get to this within a few days.
PR for addition of relocation https://github.com/ARM-software/abi-aa/pull/259
Closing the issue as resolved in #259
It looks like that
R_AARCH64_AUTH_GOT_LD_PREL19
described at https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#auth-variant-got-generating-relocations is not enough for tiny code model in case of signed GOT. Since the address of the GOT slot is used as a modifier, we need to store that address somewhere. To take this address, we should probably useadr
instruction with 21-bit immediate.I suggest to add a
R_AARCH64_AUTH_GOT_ADR_PREL21
relocation which would correspond to the following assembly operatoradr x16, :got_auth:sym
.