2 ## Test we don't report duplicate definition errors when mixing Clang STB_WEAK
3 ## and GCC STB_GNU_UNIQUE symbols.
5 # RUN: rm -rf %t && split-file %s %t && cd %t
6 # RUN: llvm-mc -filetype=obj -triple=x86_64 weak.s -o weak.o
7 # RUN: llvm-mc -filetype=obj -triple=x86_64 unique.s -o unique.o
8 # RUN: ld.lld weak.o unique.o -o weak
9 # RUN: llvm-readelf -s weak | FileCheck %s --check-prefix=WEAK
10 # RUN: ld.lld unique.o weak.o -o unique
11 # RUN: llvm-readelf -s unique | FileCheck %s --check-prefix=UNIQUE
13 # WEAK: OBJECT WEAK DEFAULT [[#]] _ZN1BIiE1aE
14 # UNIQUE: OBJECT UNIQUE DEFAULT [[#]] _ZN1BIiE1aE
18 .type _ZN1BIiE1aE,@object
19 .section .bss._ZN1BIiE1aE,"aGwR",@nobits,_ZN1BIiE1aE,comdat
24 .type _ZGVN1BIiE1aE,@object
25 .section .bss._ZGVN1BIiE1aE,"aGw",@nobits,_ZN1BIiE1aE,comdat
31 ## GCC -fgnu-unique. Note the different group signature for the second group.
33 .section .bss._ZN1BIiE1aE,"awG",@nobits,_ZN1BIiE1aE,comdat
34 .type _ZN1BIiE1aE, @gnu_unique_object
39 .section .bss._ZGVN1BIiE1aE,"awG",@nobits,_ZGVN1BIiE1aE,comdat
40 .type _ZGVN1BIiE1aE, @gnu_unique_object