Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / ExecutionEngine / JITLink / x86-64 / COFF_addr32nb_reloc.test
blob3c896f15f8da82ea62098a23c1be5b564db87abe
1 # RUN: yaml2obj %s -o %t
2 # RUN: llvm-jitlink -noexec -abs __ImageBase=0xfff00000 \
3 # RUN: -slab-allocate 100Kb -slab-address 0xfff00000 -slab-page-size 4096 \
4 # RUN: -check %s %t 
5
6 # Check IMAGE_REL_AMD64_ADDR32NB relocation properly sets the delta of target 
7 # from imagebase.
9 # jitlink-check: *{4}(pdata) = func - __ImageBase
10 --- !COFF
11 header:
12   Machine:         IMAGE_FILE_MACHINE_AMD64
13   Characteristics: [  ]
14 sections:
15   - Name:            .text
16     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
17     Alignment:       16
18     SectionData:     '0000000000000000'
19   - Name:            .func
20     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
21     Alignment:       16
22     SectionData:     '0000000000000000'
23   - Name:            .pdata
24     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
25     Alignment:       4
26     SectionData:     '0000000000000000'
27     Relocations:
28       - VirtualAddress:  0
29         SymbolTableIndex: 7
30         Type:            IMAGE_REL_AMD64_ADDR32NB
31 symbols:
32   - Name:            .text
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:          8
40       NumberOfRelocations: 0
41       CheckSum:            0
42       NumberOfLinenumbers: 0
43       Number:          1
44   - Name:            .func
45     Value:           0
46     SectionNumber:   2
47     SimpleType:      IMAGE_SYM_TYPE_NULL
48     ComplexType:     IMAGE_SYM_DTYPE_NULL
49     StorageClass:    IMAGE_SYM_CLASS_STATIC
50     SectionDefinition:
51       Length:          8
52       NumberOfRelocations: 0
53       CheckSum:            0
54       NumberOfLinenumbers: 0
55       Number:          2
56   - Name:            .pdata
57     Value:           0
58     SectionNumber:   3
59     SimpleType:      IMAGE_SYM_TYPE_NULL
60     ComplexType:     IMAGE_SYM_DTYPE_NULL
61     StorageClass:    IMAGE_SYM_CLASS_STATIC
62     SectionDefinition:
63       Length:          8
64       NumberOfRelocations: 1
65       CheckSum:            0
66       NumberOfLinenumbers: 0
67       Number:          3
68   - Name:            main
69     Value:           0
70     SectionNumber:   1
71     SimpleType:      IMAGE_SYM_TYPE_NULL
72     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
73     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
74   - Name:            func
75     Value:           0
76     SectionNumber:   2
77     SimpleType:      IMAGE_SYM_TYPE_NULL
78     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
79     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
80   - Name:            pdata
81     Value:           0
82     SectionNumber:   3
83     SimpleType:      IMAGE_SYM_TYPE_NULL
84     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
85     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL