diff options
Diffstat (limited to 'test/ELF/linkerscript/symbols-non-alloc.s')
-rw-r--r-- | test/ELF/linkerscript/symbols-non-alloc.s | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/symbols-non-alloc.s b/test/ELF/linkerscript/symbols-non-alloc.s new file mode 100644 index 0000000000000..4184487a78170 --- /dev/null +++ b/test/ELF/linkerscript/symbols-non-alloc.s @@ -0,0 +1,16 @@ +# REQUIRES: x86 +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t + +# RUN: echo "SECTIONS { . = SIZEOF_HEADERS; \ +# RUN: .text : { *(.text) } \ +# RUN: .nonalloc : { *(.nonalloc) } \ +# RUN: Sym = .; \ +# RUN: }" > %t.script +# RUN: ld.lld -o %t2 --script %t.script %t +# RUN: llvm-objdump -section-headers -t %t2 | FileCheck %s + +# CHECK: SYMBOL TABLE: +# CHECK: 00000000000000f0 .nonalloc 00000000 Sym + +.section .nonalloc,"" + .quad 0 |