diff options
Diffstat (limited to 'test/ELF/linkerscript/constructor.s')
-rw-r--r-- | test/ELF/linkerscript/constructor.s | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/constructor.s b/test/ELF/linkerscript/constructor.s new file mode 100644 index 0000000000000..acb86fd88e274 --- /dev/null +++ b/test/ELF/linkerscript/constructor.s @@ -0,0 +1,13 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: echo "SECTIONS { foo : { *(.foo) CONSTRUCTORS } }" > %t.script +# RUN: ld.lld -o %t1 --script %t.script %t.o + +# RUN: llvm-objdump -section-headers %t1 | FileCheck %s +# CHECK: Sections: +# CHECK-NEXT: Idx Name Size +# CHECK-NEXT: 0 00000000 +# CHECK-NEXT: 1 foo 00000001 + +.section foo, "a" +.byte 0 |