25 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t13# RUN: rm -f %t.a4# RUN: llvm-ar rcs %t.a %t15# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/symver-archive1.s -o %t2.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %S/Inputs/symver-archive2.s -o %t3.o7# RUN: ld.lld -o /dev/null %t2.o %t3.o %t.a8 9# RUN: not ld.lld -o /dev/null %t2.o %t3.o %t1 2>&1 | FileCheck %s --check-prefix=ERR10 11# ERR: error: duplicate symbol: x12 13## If defined xx and xx@@VER are in different files, report a duplicate definition error like GNU ld.14# ERR: error: duplicate symbol: xx15# ERR-NEXT: >>> defined at {{.*}}2.o:(.text+0x0)16# ERR-NEXT: >>> defined at {{.*}}1:(.text+0x0)17 18.text19.globl x20.type x, @function21x:22 23.globl xx24xx = x25