[ELF] relocateNonAlloc: clean up workaround code
[llvm-project.git] / lld / test / COFF / export-arm64.yaml
blob43e8205e9af3c9e3e27df5ad882b9efb79506d56
1 # REQUIRES: aarch64
3 # RUN: yaml2obj %s -o %t.obj
4 # RUN: lld-link /out:%t.dll /dll %t.obj /export:exportfn1 /export:exportfn2 /implib:%t.lib
5 # RUN: llvm-objdump -p %t.dll | FileCheck %s
6 # RUN: llvm-objdump -r %t.lib | FileCheck %s --check-prefix=RELOCS
8 # CHECK:      Export Table:
9 # CHECK:      DLL name: export-arm64.yaml.tmp.dll
10 # CHECK:      Ordinal      RVA  Name
11 # CHECK-NEXT:       1   0x1008  exportfn1
12 # CHECK-NEXT:       2   0x1010  exportfn2
13 # CHECK-NEXT:       3   0x1018  exportfn3
15 # RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$6
16 # RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$4
17 # RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$5
19 --- !COFF
20 header:
21   Machine:         IMAGE_FILE_MACHINE_ARM64
22   Characteristics: []
23 sections:
24   - Name:            .text
25     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
26     Alignment:       4
27     SectionData:     e0031f2ac0035fd6e0031f2ac0035fd6e0031f2ac0035fd6e0031f2ac0035fd6
28   - Name:            .drectve
29     Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
30     Alignment:       1
31     SectionData:     2f6578706f72743a6578706f7274666e3300  # /export:exportfn3
32 symbols:
33   - Name:            .text
34     Value:           0
35     SectionNumber:   1
36     SimpleType:      IMAGE_SYM_TYPE_NULL
37     ComplexType:     IMAGE_SYM_DTYPE_NULL
38     StorageClass:    IMAGE_SYM_CLASS_STATIC
39     SectionDefinition:
40       Length:          32
41       NumberOfRelocations: 0
42       NumberOfLinenumbers: 0
43       CheckSum:        0
44       Number:          1
45   - Name:            _DllMainCRTStartup
46     Value:           0
47     SectionNumber:   1
48     SimpleType:      IMAGE_SYM_TYPE_NULL
49     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
50     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
51   - Name:            exportfn1
52     Value:           8
53     SectionNumber:   1
54     SimpleType:      IMAGE_SYM_TYPE_NULL
55     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
56     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
57   - Name:            exportfn2
58     Value:           16
59     SectionNumber:   1
60     SimpleType:      IMAGE_SYM_TYPE_NULL
61     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
62     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
63   - Name:            exportfn3
64     Value:           24
65     SectionNumber:   1
66     SimpleType:      IMAGE_SYM_TYPE_NULL
67     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
68     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
69 ...