1 # COMDAT sections with non-external linkage should not be merged by ICF.
3 # RUN: yaml2obj %s -o %t1.obj
4 # RUN: sed s/foo/main/ %s | yaml2obj > %t2.obj
5 # RUN: lld-link /out:%t.exe /entry:main /subsystem:console /verbose \
6 # RUN: %t1.obj %t2.obj > %t.log 2>&1
7 # RUN: FileCheck %s < %t.log
9 # CHECK-NOT: Removed bar
13 Machine: IMAGE_FILE_MACHINE_AMD64
17 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
19 SectionData: 488D0500000000C3
23 Type: IMAGE_REL_AMD64_REL32
25 Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_READ ]
27 SectionData: 2A000000000000002B00000000000000
32 SimpleType: IMAGE_SYM_TYPE_NULL
33 ComplexType: IMAGE_SYM_DTYPE_NULL
34 StorageClass: IMAGE_SYM_CLASS_STATIC
37 NumberOfRelocations: 1
38 NumberOfLinenumbers: 0
44 SimpleType: IMAGE_SYM_TYPE_NULL
45 ComplexType: IMAGE_SYM_DTYPE_NULL
46 StorageClass: IMAGE_SYM_CLASS_STATIC
49 NumberOfRelocations: 0
50 NumberOfLinenumbers: 0
53 Selection: IMAGE_COMDAT_SELECT_ANY
57 SimpleType: IMAGE_SYM_TYPE_NULL
58 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
59 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
63 SimpleType: IMAGE_SYM_TYPE_NULL
64 ComplexType: IMAGE_SYM_DTYPE_NULL
65 StorageClass: IMAGE_SYM_CLASS_STATIC