blob: 11753a69213004767c16e998c04f53aa375ac117 [file] [log] [blame]
George Rimardb21e532017-08-29 15:05:141# REQUIRES: x86
2# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %ta.o
3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux -o %t.o < /dev/null
4# RUN: rm -f %tar.a
5# RUN: llvm-ar rcs %tar.a %ta.o
6
7# RUN: echo "SECTIONS { foo = 1; }" > %t1.script
8# RUN: ld.lld -o %t1.exe --script %t1.script %tar.a %t.o
9# RUN: llvm-readobj -symbols %t1.exe | FileCheck %s
10# CHECK-NOT: bar
11# CHECK: foo
12# CHECK-NOT: bar
13
14# RUN: echo "SECTIONS { zed = foo; }" > %t2.script
15# RUN: ld.lld -o %t2.exe --script %t2.script %tar.a %t.o
16# RUN: llvm-readobj -symbols %t2.exe | FileCheck %s --check-prefix=SYMS
17# SYMS: bar
18# SYMS: foo
19
20.text
21.globl foo
22foo:
23 nop
24
25.globl bar
26bar:
27 nop