Skip to content

Add support for aarch64-unknown-linux-pauthtest target#1713

Open
jchlanda wants to merge 2 commits into
rust-lang:mainfrom
jchlanda:jakub/pauthtest
Open

Add support for aarch64-unknown-linux-pauthtest target#1713
jchlanda wants to merge 2 commits into
rust-lang:mainfrom
jchlanda:jakub/pauthtest

Conversation

@jchlanda
Copy link
Copy Markdown

This PR adds support for aarch64-unknown-linux-pauthtest, a target that enables Pointer Authentication Code (PAC) support in Rust on AArch64 ELF based Linux systems. It uses the aarch64-unknown-linux-pauthtest LLVM target and a pointer-authentication-enabled sysroot with a custom musl as a reference libc implementation. Dynamic linking is required, with a dynamic linker acting as the ELF interpreter that can resolve pauth relocations and enforce pointer authentication constraints.

Please note, that while cc-rs is able to compile c/c++ sources and link against the target binary successfully this is not sufficient for aarch64-unknown-linux-pauthtest. The target has a hard requirement on shared objects and dynamic linker must be used. This seems to be incompatible with the current state of cc-rs.

Please consult a rust-lang PR for the details on the target: rust-lang/rust#155722

@jchlanda jchlanda changed the title Add support for pointer authentication environment Add support for aarch64-unknown-linux-pauthtest target May 12, 2026
@jchlanda
Copy link
Copy Markdown
Author

Although the parent change (introduction of aarch64-unknown-linux-pauthtest) has not landed yet, it seems this should not prevent this PR from being marked as ready for review.

@jchlanda jchlanda marked this pull request as ready for review May 13, 2026 14:10
Copy link
Copy Markdown
Contributor

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, cc @madsmtm since you have also reviewed the corresponding rustc PR, can you please also take a look at this?

@jchlanda
Copy link
Copy Markdown
Author

@davidtwco, @folkertdev, @tgross35, @madsmtm FWI this is a follow up to rust-lang/rust#155722

Copy link
Copy Markdown
Contributor

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor typo

Comment thread src/lib.rs Outdated
`cc-rs` only builds static libraries, while `pauthtest` requires shared
objects.
Copy link
Copy Markdown
Contributor

@NobodyXu NobodyXu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks lgtm, just waiting for others to double check

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.

2 participants