From d2d3ebb81992e107edf95c1c136d7a342d9b1418 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 16 Apr 2017 16:03:39 +0000 Subject: Vendor import of lld trunk r300422: https://llvm.org/svn/llvm-project/lld/trunk@300422 --- test/ELF/linkerscript/constructor.s | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/ELF/linkerscript/constructor.s (limited to 'test/ELF/linkerscript/constructor.s') diff --git a/test/ELF/linkerscript/constructor.s b/test/ELF/linkerscript/constructor.s new file mode 100644 index 000000000000..acb86fd88e27 --- /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 -- cgit v1.2.3