ARM-software / abi-aa

Application Binary Interface for the Arm® Architecture
Other
938 stars 188 forks source link

[PAUTHABIELF64] Possible typo in `R_AARCH64_AUTH_GOT_LO12_NC` #253

Closed kovdan01 closed 2 months ago

kovdan01 commented 6 months ago

In https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst#auth-variant-got-generating-relocations, AUTH variants of GOT-generating relocations are defined. Their names are in most cases basically the same as corresponding non-AUTH relocs names, but for R_AARCH64_AUTH_GOT_LO12_NC, it's not true: the non-AUTH variant contains LD64 (R_<CLS>_LD64_GOT_LO12_NC), so the AUTH variant should probably be R_AARCH64_AUTH_LD64_GOT_LO12_NC. If LD64 is considered redundant since we don't have 32-bit versions of AUTH relocations, it should be probably deleted from other AUTH relocs names: in R_AARCH64_AUTH_LD64_GOTOFF_LO15 and R_AARCH64_AUTH_LD64_GOTPAGE_LO15, LD64 is present.

Is LD64 omitted in R_AARCH64_AUTH_GOT_LO12_NC intentionally? If yes, it would be nice if you explain rationale of such decision.

kovdan01 commented 6 months ago

Tagging @smithp35 Tagging @asl

smithp35 commented 6 months ago

I'm on vacation this week. Will get back to you after Easter.

It is most likely a typo, my memory is that I wanted to match the existing dynamic relocations. I'll check when I get back to see if there is any other reason.

smithp35 commented 6 months ago

I agree this is a typo. I've created https://github.com/ARM-software/abi-aa/pull/255 to fix.

To the best of my knowledge the Appendix on GOT generating relocations hasn't been implemented before. At the time of writing the interested parties preferred to have a RELRO unsigned GOT.

kovdan01 commented 2 months ago

Closing the issue as resolved in #255