aboutsummaryrefslogtreecommitdiff
path: root/test/MC/ARM/elf-execute-only-section.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/ARM/elf-execute-only-section.ll')
-rw-r--r--test/MC/ARM/elf-execute-only-section.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/MC/ARM/elf-execute-only-section.ll b/test/MC/ARM/elf-execute-only-section.ll
new file mode 100644
index 00000000000..2be3f4c7038
--- /dev/null
+++ b/test/MC/ARM/elf-execute-only-section.ll
@@ -0,0 +1,13 @@
+; RUN: llc < %s -mtriple=thumbv8m.base-eabi -mattr=+execute-only -filetype=obj %s -o - | \
+; RUN: llvm-readelf -s | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv8m.main-eabi -mattr=+execute-only -filetype=obj %s -o - | \
+; RUN: llvm-readelf -s | FileCheck %s
+; RUN: llc < %s -mtriple=thumbv7m-eabi -mattr=+execute-only -filetype=obj %s -o - | \
+; RUN: llvm-readelf -s | FileCheck %s
+
+; CHECK-NOT: {{.text[ ]+PROGBITS[ ]+[0-9]+ [0-9]+ [0-9]+ [0-9]+ AX[^p]}}
+; CHECK: {{.text[ ]+PROGBITS[ ]+[0-9]+ [0-9]+ [0-9]+ [0-9]+ AXp}}
+define void @test_func() {
+entry:
+ ret void
+}