Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pauthabi64] Add Auth variants of TLSDESC generating GOT relocations #295

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smithp35
Copy link
Contributor

@smithp35 smithp35 commented Nov 5, 2024

Add static Auth equivalents of the existing relocations:

  • R_AARCH64_TLSDESC_ADR_PAGE21
  • R_AARCH64_TLSDESC_LD64_LO12
  • R_AARCH64_TLSDESC_ADD_LO12

These are sufficient to implement the small code-model for TLSDESC using the PAuthABI. Support for the tiny and large code-model is not implemented for the PAuthABI, or for the normal ABI in both clang and GCC so we defer from specifiying Auth variants of all possible relocations.

I've followed the convention that non-zero addends are not permitted for GOT generating relocations. As each unique S+A combination needs its own pair of GOT slots indexed by S+A and no static linker supports that.

Fixes #293

Add static Auth equivalents of the existing relocations:
* R_AARCH64_TLSDESC_ADR_PAGE21
* R_AARCH64_TLSDESC_LD64_LO12
* R_AARCH64_TLSDESC_ADD_LO12

These are sufficient to implement the small code-model for TLSDESC
using the PAuthABI. Support for the tiny and large code-model is
not implemented for the PAuthABI, or for the normal ABI in both
clang and GCC so we defer from specifiying Auth variants of all
possible relocations.

I've followed the convention that non-zero addends are not
permitted for GOT generating relocations. As each unique S+A
combination needs its own pair of GOT slots indexed by S+A and
no static linker supports that.

Fixes ARM-software#293
kovdan01 added a commit to llvm/llvm-project that referenced this pull request Nov 18, 2024
smithp35 added a commit to smithp35/abi-aa that referenced this pull request Nov 29, 2024
In the initial draft relocations for signing GOT entries were
defined in the private space reserved for experiments. It was not
known if these relocations would be useful as if RELRO is supported
the GOT does not need to be signed. There is now at least one user
of the GOT signing relocations so we should move the relocations
out of the private space and into the space reserved for the
PAuthABI.

This PR includes relocations added in
ARM-software#295

Fixes: ARM-software#298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[pauthabielf64] Define static AUTH TLSDESC relocations
1 participant