31 lines · plain
1# REQUIRES: x862## COMDAT groups are deduplicated by the name of the signature symbol.3## The local/global status is not part of the equation.4 5# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o6# RUN: ld.lld %t.o %t.o -o %t7# RUN: llvm-readelf -s -x .zero -x .comdat %t | FileCheck %s8 9# CHECK: Type Bind Vis Ndx Name10# CHECK-NEXT: NOTYPE LOCAL DEFAULT UND11# CHECK-NEXT: NOTYPE LOCAL DEFAULT [[#A:]] zero12# CHECK-NEXT: NOTYPE LOCAL DEFAULT [[#]] comdat13# CHECK-NEXT: NOTYPE LOCAL DEFAULT [[#A]] zero14# CHECK-NOT: {{.}}15 16## Non-GRP_COMDAT groups are never deduplicated.17# CHECK: Hex dump of section '.zero':18# CHECK-NEXT: [[#%x,]] 020219 20## GRP_COMDAT groups are deduplicated.21# CHECK: Hex dump of section '.comdat':22# CHECK-NEXT: [[#%x,]] 01 .{{$}}23 24.section .zero,"aG",@progbits,zero25zero:26 .byte 227 28.section .comdat,"aG",@progbits,comdat,comdat29comdat:30 .byte 131