Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / ELF / symver-archive.s
blobc823be4769e1ad24dba2e5ffc4c7796152b492f1
1 # REQUIRES: x86
2 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t1
3 # RUN: rm -f %t.a
4 # RUN: llvm-ar rcs %t.a %t1
5 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/symver-archive1.s -o %t2.o
6 # RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/symver-archive2.s -o %t3.o
7 # RUN: ld.lld -o /dev/null %t2.o %t3.o %t.a
9 # RUN: not ld.lld -o /dev/null %t2.o %t3.o %t1 2>&1 | FileCheck %s --check-prefix=ERR
11 # ERR: error: duplicate symbol: x
13 ## If defined xx and xx@@VER are in different files, report a duplicate definition error like GNU ld.
14 # ERR: error: duplicate symbol: xx
15 # ERR-NEXT: >>> defined at {{.*}}2.o:(.text+0x0)
16 # ERR-NEXT: >>> defined at {{.*}}1:(.text+0x0)
18 .text
19 .globl x
20 .type x, @function
23 .globl xx
24 xx = x