-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[AArch64][PAC][MC][ELF] Support PAuth ABI compatibility tag #85236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6182b04
[AArch64][PAC][MC][ELF] Support PAuth ABI compatibility tag
kovdan01 9241efc
Merge branch 'main' into pauth-gnuprop-mc
kovdan01 6a0bec4
Rename PAuth ABI tag to PAuth ABI core info (see #85231)
kovdan01 ab89fdc
Move check of module flags to verifier
kovdan01 2f6dc0a
Address review comments
kovdan01 d313921
Fix code formatting
kovdan01 fae3521
Merge branch 'main' into pauth-gnuprop-mc
kovdan01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
50 changes: 50 additions & 0 deletions
50
llvm/test/CodeGen/AArch64/note-gnu-property-elf-pauthabi.ll
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
; RUN: rm -rf %t && split-file %s %t && cd %t | ||
|
||
;--- ok.ll | ||
|
||
; RUN: llc -mtriple=aarch64-linux ok.ll -o - | \ | ||
; RUN: FileCheck %s --check-prefix=ASM | ||
; RUN: llc -mtriple=aarch64-linux ok.ll -filetype=obj -o - | \ | ||
; RUN: llvm-readelf --notes - | FileCheck %s --check-prefix=OBJ | ||
|
||
!llvm.module.flags = !{!0, !1} | ||
|
||
!0 = !{i32 1, !"aarch64-elf-pauthabi-platform", i32 268435458} | ||
!1 = !{i32 1, !"aarch64-elf-pauthabi-version", i32 85} | ||
|
||
; ASM: .section .note.gnu.property,"a",@note | ||
; ASM-NEXT: .p2align 3, 0x0 | ||
; ASM-NEXT: .word 4 | ||
; ASM-NEXT: .word 24 | ||
; ASM-NEXT: .word 5 | ||
; ASM-NEXT: .asciz "GNU" | ||
; 3221225473 = 0xc0000001 = GNU_PROPERTY_AARCH64_FEATURE_PAUTH | ||
; ASM-NEXT: .word 3221225473 | ||
; ASM-NEXT: .word 16 | ||
; ASM-NEXT: .xword 268435458 | ||
; ASM-NEXT: .xword 85 | ||
|
||
; OBJ: Displaying notes found in: .note.gnu.property | ||
; OBJ-NEXT: Owner Data size Description | ||
; OBJ-NEXT: GNU 0x00000018 NT_GNU_PROPERTY_TYPE_0 (property note) | ||
; OBJ-NEXT: AArch64 PAuth ABI core info: platform 0x10000002 (llvm_linux), version 0x55 (PointerAuthIntrinsics, !PointerAuthCalls, PointerAuthReturns, !PointerAuthAuthTraps, PointerAuthVTPtrAddressDiscrimination, !PointerAuthVTPtrTypeDiscrimination, PointerAuthInitFini) | ||
|
||
; ERR: either both or no 'aarch64-elf-pauthabi-platform' and 'aarch64-elf-pauthabi-version' module flags must be present | ||
|
||
;--- err1.ll | ||
|
||
; RUN: not --crash llc -mtriple=aarch64-linux err1.ll 2>&1 -o - | \ | ||
; RUN: FileCheck %s --check-prefix=ERR | ||
|
||
!llvm.module.flags = !{!0} | ||
|
||
!0 = !{i32 1, !"aarch64-elf-pauthabi-platform", i32 2} | ||
|
||
;--- err2.ll | ||
|
||
; RUN: not --crash llc -mtriple=aarch64-linux err2.ll 2>&1 -o - | \ | ||
; RUN: FileCheck %s --check-prefix=ERR | ||
|
||
!llvm.module.flags = !{!0} | ||
|
||
!0 = !{i32 1, !"aarch64-elf-pauthabi-version", i32 31} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, thanks, see 2f6dc0a