• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: x86
2
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 -symbols %t.exe | FileCheck %s
7
8# CHECK: _binary_
9# CHECK: foobar
10
11# RUN: echo "TARGET(foo)" > %t2.script
12# RUN: not ld.lld --script %t2.script -o /dev/null 2>&1 | FileCheck -check-prefix=ERR %s
13
14# ERR: unknown target: foo
15
16.global foobar
17foobar:
18  nop
19