2 ## COMDAT groups are deduplicated by the name of the signature symbol.
3 ## The local/global status is not part of the equation.
5 # RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
6 # RUN: ld.lld %t.o %t.o -o %t
7 # RUN: llvm-readelf -s -x .zero -x .comdat %t | FileCheck %s
9 # CHECK: Type Bind Vis Ndx Name
10 # CHECK-NEXT: NOTYPE LOCAL DEFAULT UND
11 # CHECK-NEXT: NOTYPE LOCAL DEFAULT [[#A:]] zero
12 # CHECK-NEXT: NOTYPE LOCAL DEFAULT [[#]] comdat
13 # CHECK-NEXT: NOTYPE LOCAL DEFAULT [[#A]] zero
16 ## Non-GRP_COMDAT groups are never deduplicated.
17 # CHECK: Hex dump of section '.zero':
18 # CHECK-NEXT: [[#%x,]] 0202
20 ## GRP_COMDAT groups are deduplicated.
21 # CHECK: Hex dump of section '.comdat':
22 # CHECK-NEXT: [[#%x,]] 01 .{{$}}
24 .section .zero,"aG",@progbits,zero
28 .section .comdat,"aG",@progbits,comdat,comdat