[AArch64] Add support for pointer authentication relocations#801
Merged
Shankar Easwaran (quic-seaswara) merged 1 commit intoFeb 25, 2026
Merged
Conversation
2d93aa4 to
7c37e18
Compare
Contributor
|
pzhengqc might be a better suited to review this. |
quic-areg
reviewed
Feb 11, 2026
7c37e18 to
4521653
Compare
Contributor
|
Eli Friedman (@efriedma-quic) can you please review this change ? |
0a0c802 to
51874e0
Compare
Implements basic PAuth support for AArch64 following the PAuth ABI Extension specification (2025Q1): https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst **Adds:** - R_AARCH64_AUTH_ABS64 (0x244): authenticated absolute relocations - R_AARCH64_AUTH_RELATIVE (0x411): authenticated relative relocations **Testing:** Covers PIE/non-PIE/static executables, as well as various corner cases from the spec like undefined weak references, COPY relocations and non-allocating sections. **Not included:** GOT/PLT signing, additional AUTH relocation types (future work). **Notes:** I changed the way *GNULDBackend::recordRelativeReloc* store relative relocations. The original map is only iterated once (in a linear way), but reversing the key / values allows to implement an efficient *GNULDBackend::findRelativeReloc*. No changes to existing non-AUTH relocation behavior. Signed-off-by: Cedric Tessier <ctessier@qti.qualcomm.com>
51874e0 to
1641f30
Compare
Shankar Easwaran (quic-seaswara)
approved these changes
Feb 24, 2026
4a3231e
into
qualcomm:main
3 checks passed
| ResolveInfo *rsym = pReloc.symInfo(); | ||
| Relocator::DWord A = pReloc.addend(); | ||
| Relocator::DWord S = pParent.getSymValue(&pReloc); | ||
| Relocator::Address targetVal = S + A; |
Contributor
There was a problem hiding this comment.
It looks like this changes the behavior for non-pauth code: the value of "S" is modified by the code below (if (rsym && rsym->reserved() & Relocator::ReservePLT) etc.). I assume that's not intentional?
Contributor
Author
There was a problem hiding this comment.
No, this was never intended :(
I submitted a PR to fix this regression (#1334).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements basic PAuth support for AArch64 following the PAuth ABI Extension specification (2025Q1):
https://github.com/ARM-software/abi-aa/blob/main/pauthabielf64/pauthabielf64.rst
Adds:
Testing:
Covers PIE/non-PIE/static executables, as well as various corner cases from the spec like undefined weak references, COPY relocations and non-allocating sections.
Not included:
GOT/PLT signing, additional AUTH relocation types (future work).
Notes:
I changed the way GNULDBackend::recordRelativeReloc store relative relocations. The original map is only iterated once (in a linear way), but reversing the key / values allows to implement an efficient GNULDBackend::findRelativeReloc.
No changes to existing non-AUTH relocation behavior.