Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / archive-as-start-lib.s
blob0bb6eea6d3251d9abec43f1a28f8d0b2cba619a2
1 # REQUIRES: x86
2 # UNSUPPORTED: system-windows
4 # RUN: rm -rf %t && split-file %s %t && cd %t
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 a.s -o a.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64 b.s -o b.o
8 ## Create an archive with incomplete index: foo is missing.
9 # RUN: llvm-ar --format=gnu rc a.a a.o
10 # RUN: llvm-ar --format=gnu rcS b.a b.o && tail -c +9 b.a > b-tail
11 # RUN: cat a.a b-tail > weird.a
12 # RUN: llvm-nm --print-armap weird.a | FileCheck %s --check-prefix=ARMAP
14 # ARMAP: Archive map
15 # ARMAP-NEXT: _start in a.o
16 # ARMAP-EMPTY:
18 ## The incomplete archive index is ignored. -u foo extracts weird.a(b.o).
19 ## In GNU ld, foo is undefined.
20 # RUN: ld.lld -m elf_x86_64 -u foo weird.a -o lazy
21 # RUN: llvm-nm lazy | FileCheck %s --implicit-check-not={{.}}
23 # CHECK: [[#%x,]] T _start
24 # CHECK: [[#%x,]] T foo
26 #--- a.s
27 .globl _start
28 _start:
30 #--- b.s
31 .globl foo
32 foo: