[lld][MachO] Add ARM64e pointer authentication linking support#188378
Open
oskarwirga wants to merge 22 commits intollvm:mainfrom
Open
[lld][MachO] Add ARM64e pointer authentication linking support#188378oskarwirga wants to merge 22 commits intollvm:mainfrom
oskarwirga wants to merge 22 commits intollvm:mainfrom
Conversation
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.
This PR implements ARM64e linking support in lld's Mach-O backend. This is a continuation of work discussed in #79543 and I included @BertalanD's suggestion to keep the Relocation object size small, thanks! This PR is part of several I have planned, but contains everything needed to link arm64e Mach-Os with LLD.
What this PR adds
sizeof(Relocation)at 24 bytes.__auth_gotsection for signed function pointers alongside the existing unsigned __got. Stubs load from__auth_got; address-taken data references use__got.__auth_got; personality pointers in unwind info route to__auth_got; ObjC message send fast stubs use__auth_gotfor objc_msgSend lookup withbraaauthenticationTesting
AI Disclosure
I used Claude heavily throughout development, primarily to iterate through linker errors. All generated code was manually reviewed and tested on ARM64e hardware. I feel very confident in these changes being functionally correct because I tested on hardware extensively, architecturally they may be lacking!