3 # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
4 # RUN: echo "TARGET(binary) INPUT(\"%t.o\") TARGET(elf64-x86-64) INPUT(\"%t.o\")" > %t.script
5 # RUN: ld.lld --script %t.script -o %t.exe
6 # RUN: llvm-readelf -s %t.exe | FileCheck %s
7 # RUN: echo 'TARGET("elf64-x86-64") INPUT("%t.o") TARGET("binary") INPUT("%t.o")' > %t.script
8 # RUN: ld.lld -T %t.script -o %t
9 # RUN: llvm-readelf -s %t | FileCheck %s
11 # CHECK-DAG: [[#]] _binary_
12 # CHECK-DAG: [[#]] foobar
14 # RUN: echo "TARGET(foo)" > %t2.script
15 # RUN: not ld.lld --script %t2.script -o /dev/null 2>&1 | FileCheck -check-prefix=ERR %s
17 # ERR: unknown target: foo