diff options
Diffstat (limited to 'test/ELF/linkerscript/sections-constraint2.s')
-rw-r--r-- | test/ELF/linkerscript/sections-constraint2.s | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/sections-constraint2.s b/test/ELF/linkerscript/sections-constraint2.s new file mode 100644 index 0000000000000..e726365582d8b --- /dev/null +++ b/test/ELF/linkerscript/sections-constraint2.s @@ -0,0 +1,14 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o +# RUN: echo "SECTIONS { zed : ONLY_IF_RO { *(foo) *(bar) } }" > %t.script +# RUN: ld.lld -T %t.script %t.o -o %t.so -shared +# RUN: llvm-readobj -s %t.so | FileCheck %s + +# CHECK: Sections [ +# CHECK-NOT: zed + +.section foo,"aw" +.quad 1 + +.section bar, "a" +.quad 2 |