diff options
| author | Momchil Velikov <momchil.velikov@arm.com> | 2019-12-13 17:37:22 +0000 |
|---|---|---|
| committer | Momchil Velikov <momchil.velikov@arm.com> | 2019-12-13 17:38:20 +0000 |
| commit | d53e61863d48a07ce285d5b0a36abc67583023bd (patch) | |
| tree | 8bde0f4b031e8478cd9e27c208a368398db5171f /llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll | |
| parent | f99eedeb72644671cd584f48e4c136d47f6b0020 (diff) | |
| download | bcm5719-llvm-d53e61863d48a07ce285d5b0a36abc67583023bd.tar.gz bcm5719-llvm-d53e61863d48a07ce285d5b0a36abc67583023bd.zip | |
[AArch64] Emit PAC/BTI .note.gnu.property flags
This patch make LLVM emit the processor specific program property types
defined in AArch64 ELF spec
https://developer.arm.com/docs/ihi0056/f/elf-for-the-arm-64-bit-architecture-aarch64-abi-2019q2-documentation
A file containing no functions gets both property flags. Otherwise, a property
is set iff all the functions in the file have the corresponding attribute.
Patch by Daniel Kiss and Momchil Velikov.
Differential Revision: https://reviews.llvm.org/D71019
Diffstat (limited to 'llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll b/llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll new file mode 100644 index 00000000000..b57a23b97b2 --- /dev/null +++ b/llvm/test/CodeGen/AArch64/note-gnu-property-pac-bti-6.ll @@ -0,0 +1,22 @@ +; RUN: llc -mtriple=aarch64-linux %s -o - | \ +; RUN: FileCheck %s --check-prefix=ASM +; RUN: llc -mtriple=aarch64-linux %s -filetype=obj -o - | \ +; RUN: llvm-readelf -S | FileCheck %s --check-prefix=OBJ + +define dso_local i32 @f() #0 { +entry: + ret i32 0 +} + +define dso_local i32 @g() #1 { +entry: + ret i32 0 +} + +attributes #0 = { "sign-return-address"="non-leaf" } + +attributes #1 = { "sign-return-address"="none" } + +; No common attribute, no note section +; ASM-NOT: .note.gnu.property +; OBJ-NOT: .note.gnu.property |

