Skip to content

Conversation

@smithp35
Copy link
Contributor

@smithp35 smithp35 commented Feb 6, 2026

The PAuthABI introduces some new dynamic relocations and the MemtagABI adds additional semantics to existing core dynamic relocations.

The additional semantics for MemtagABI can be applied to the new PAuthABI dynamic relocations. In most cases the extension is natural as the LDG and SIGN operations operate on different bits in the pointer and can apply in either order.

Both the MemtagABI and the PAuthABI require additional metadata for the R_AARCH64_AUTH_RELATIVE relocation which is stored in the place of the relocation. The MemtagABI stores
an additional addend compensator so that the dynamic linker can derive the start address of the datatype so that it can materialize the correct tag. The PAuthABI stores the signing schema, including an addend field which contains the relocation addend when RELR compression is used. As the MemtagABI excludes any relocations with an addend compensator from RELR compression, and PAuthABI requires the addend field in the signing schema to be 0 when RELR compression is not used; we can use the signing schema addend field for the Memtag addend compensator.

Document the relocation operators and how the MemtagABI applies to the PAuthABI relocations.

This behaviour was implemented in LLD PR
llvm/llvm-project#173291

The PAuthABI introduces some new dynamic relocations and the
MemtagABI adds additional semantics to existing core dynamic
relocations.

The additional semantics for MemtagABI can be applied to the
new PAuthABI dynamic relocations. In most cases the extension
is natural as the LDG and SIGN operations operate on different
bits in the pointer and can apply in either order.

Both the MemtagABI and the PAuthABI require additional metadata
for the R_AARCH64_AUTH_RELATIVE relocation which is stored in the
place of the relocation. The MemtagABI stores
an additional addend compensator so that the dynamic linker can
derive the start address of the datatype so that it can materialize
the correct tag. The PAuthABI stores the signing schema, including
an addend field which contains the relocation addend when RELR
compression is used. As the MemtagABI excludes any relocations with
an addend compensator from RELR compression, and PAuthABI requires
the addend field in the signing schema to be 0 when RELR compression
is not used; we can use the signing schema addend field for the
Memtag addend compensator.

Document the relocation operators and how the MemtagABI applies
to the PAuthABI relocations.

This behaviour was implemented in LLD PR
llvm/llvm-project#173291
@smithp35 smithp35 merged commit ec2569f into ARM-software:main Feb 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants