Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / shared-lazy.s
blob36b8f16e1794d66394f2beff761c7f5dcd72698b
1 // REQUIRES: x86
2 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1.o
3 // RUN: rm -f %t1.a
4 // RUN: llvm-ar rc %t1.a %t1.o
5 // RUN: ld.lld %t1.o -o %t1.so -shared
6 // RUN: echo ".global foo" > %t2.s
7 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %t2.s -o %t2.o
8 // RUN: ld.lld %t1.a %t1.so %t2.o -o %t.so -shared
9 // RUN: llvm-readelf --dyn-symbols %t.so | FileCheck %s
11 // Test that 'foo' from %t1.so is used and we don't fetch a member
12 // from the archive.
14 // CHECK: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND foo
16 .global foo
17 foo: