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 8 9# RUN: not ld.lld -o /dev/null %t2.o %t3.o %t1 2>&1 | FileCheck %s --check-prefix=ERR 10 11# ERR: error: duplicate symbol: x 12 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) 17 18.text 19.globl x 20.type x, @function 21x: 22 23.globl xx 24xx = x 25