Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lld / test / COFF / icf-different-align.test
blob1fd0dc26e9ec015ad620f6a81f5f79db92c5dabd
1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /entry:foo /out:%t.exe /subsystem:console /include:bar \
3 # RUN:   /verbose %t.obj > %t.log 2>&1
4 # RUN: FileCheck %s < %t.log
5 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=OBJDUMP %s
7 # CHECK: Selected foo
8 # CHECK:   Removed bar
10 # OBJDUMP: Contents of section .text:
11 # OBJDUMP-NEXT: 140001000 00cccccc cccccccc cccccccc cccccccc
12 # OBJDUMP-NEXT: 140001010 4883ec28 e8000000 004883c4 28c3
14 --- !COFF
15 header:
16   Machine:         IMAGE_FILE_MACHINE_AMD64
17   Characteristics: []
18 sections:
19   - Name:            '.text$mn'
20     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
21     Alignment:       8
22     SectionData:     4883EC28E8000000004883C428C3
23   - Name:            '.text$mn'
24     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_LNK_COMDAT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
25     Alignment:       16
26     SectionData:     4883EC28E8000000004883C428C3
27   - Name:            '.text'
28     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
29     Alignment:       1
30     SectionData:     00
31 symbols:
32   - Name:            '.text$mn'
33     Value:           0
34     SectionNumber:   1
35     SimpleType:      IMAGE_SYM_TYPE_NULL
36     ComplexType:     IMAGE_SYM_DTYPE_NULL
37     StorageClass:    IMAGE_SYM_CLASS_STATIC
38     SectionDefinition:
39       Length:          14
40       NumberOfRelocations: 0
41       NumberOfLinenumbers: 0
42       CheckSum:        1682752513
43       Number:          0
44       Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES
45   - Name:            '.text$mn'
46     Value:           0
47     SectionNumber:   2
48     SimpleType:      IMAGE_SYM_TYPE_NULL
49     ComplexType:     IMAGE_SYM_DTYPE_NULL
50     StorageClass:    IMAGE_SYM_CLASS_STATIC
51     SectionDefinition:
52       Length:          14
53       NumberOfRelocations: 0
54       NumberOfLinenumbers: 0
55       CheckSum:        1682752513
56       Number:          0
57       Selection:       IMAGE_COMDAT_SELECT_NODUPLICATES
58   - Name:            foo
59     Value:           0
60     SectionNumber:   1
61     SimpleType:      IMAGE_SYM_TYPE_NULL
62     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
63     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
64   - Name:            bar
65     Value:           0
66     SectionNumber:   2
67     SimpleType:      IMAGE_SYM_TYPE_NULL
68     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
69     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
70 ...