Skip to content

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

Merged
NobodyXu merged 2 commits into
rust-lang:mainfrom
jchlanda:jakub/pauthtest
Jul 8, 2026
Merged

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

Conversation

@jchlanda

Copy link
Copy Markdown
Contributor

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
Contributor 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

@NobodyXu NobodyXu left a comment

Copy link
Copy Markdown
Contributor

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
Contributor Author

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

@NobodyXu NobodyXu left a comment

Copy link
Copy Markdown
Contributor

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

@NobodyXu NobodyXu left a comment

Copy link
Copy Markdown
Contributor

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

@jchlanda

jchlanda commented Jul 1, 2026

Copy link
Copy Markdown
Contributor Author

Hi all (@davidtwco, @folkertdev, @tgross35, @madsmtm, @bjorn3),

The PR introducing the pauthtest target has been merged into main. I'd be very grateful if we could move this one forward as well.

Thank you!

@jchlanda

jchlanda commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@NobodyXu, would you be able to suggest any reviewers for this PR, or help move it forward? Now that the library PR has been earmarked for merging, this will be the last missing piece for pauthtest. Thank you!

@NobodyXu NobodyXu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hello!

I'm willing to merge it if you rebase and addressed my two comments, given that there's no objection and rust already has it, delaying this PR adds no value, even if I don't have the knowledge to check every detail, merging it is better than not

Comment thread src/target/parser.rs Outdated
Comment thread src/lib.rs
jchlanda added 2 commits July 8, 2026 13:59
`cc-rs` only builds static libraries, while `pauthtest` requires shared
objects.
@jchlanda jchlanda requested a review from NobodyXu July 8, 2026 13:59

@NobodyXu NobodyXu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, LGTM, would merge in this PR

Scheduled release is around this Friday, however I can cut an early release as we also have a nightly/1.95 deprecation fix (by ignoring the deprecation)

@NobodyXu NobodyXu merged commit 43ae1bf into rust-lang:main Jul 8, 2026
79 checks passed
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