diff options
Diffstat (limited to 'test/ELF/linkerscript/target.s')
-rw-r--r-- | test/ELF/linkerscript/target.s | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/ELF/linkerscript/target.s b/test/ELF/linkerscript/target.s new file mode 100644 index 0000000000000..32db5b7866c2a --- /dev/null +++ b/test/ELF/linkerscript/target.s @@ -0,0 +1,18 @@ +# REQUIRES: x86 + +# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o +# RUN: echo "TARGET(binary) INPUT(\"%t.o\") TARGET(elf64-x86-64) INPUT(\"%t.o\")" > %t.script +# RUN: ld.lld --script %t.script -o %t.exe +# RUN: llvm-readelf -symbols %t.exe | FileCheck %s + +# CHECK: _binary_ +# CHECK: foobar + +# RUN: echo "TARGET(foo)" > %t2.script +# RUN: not ld.lld --script %t2.script -o /dev/null 2>&1 | FileCheck -check-prefix=ERR %s + +# ERR: unknown target: foo + +.global foobar +foobar: + nop |