[LLD][COFF] Fix TypeServerSource matcher with more than one collision
[llvm-project.git] / lld / test / COFF / export-arm64.yaml
blob72a24d5c0182077529b1659e6b0ed89a1ff4bf66
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:       0        0
12 # CHECK-NEXT:       1   0x1008  exportfn1
13 # CHECK-NEXT:       2   0x1010  exportfn2
14 # CHECK-NEXT:       3   0x1018  exportfn3
16 # RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$6
17 # RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$4
18 # RELOCS: IMAGE_REL_ARM64_ADDR32NB .idata$5
20 --- !COFF
21 header:
22   Machine:         IMAGE_FILE_MACHINE_ARM64
23   Characteristics: []
24 sections:
25   - Name:            .text
26     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
27     Alignment:       4
28     SectionData:     e0031f2ac0035fd6e0031f2ac0035fd6e0031f2ac0035fd6e0031f2ac0035fd6
29   - Name:            .drectve
30     Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
31     Alignment:       1
32     SectionData:     2f6578706f72743a6578706f7274666e3300  # /export:exportfn3
33 symbols:
34   - Name:            .text
35     Value:           0
36     SectionNumber:   1
37     SimpleType:      IMAGE_SYM_TYPE_NULL
38     ComplexType:     IMAGE_SYM_DTYPE_NULL
39     StorageClass:    IMAGE_SYM_CLASS_STATIC
40     SectionDefinition:
41       Length:          32
42       NumberOfRelocations: 0
43       NumberOfLinenumbers: 0
44       CheckSum:        0
45       Number:          1
46   - Name:            _DllMainCRTStartup
47     Value:           0
48     SectionNumber:   1
49     SimpleType:      IMAGE_SYM_TYPE_NULL
50     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
51     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
52   - Name:            exportfn1
53     Value:           8
54     SectionNumber:   1
55     SimpleType:      IMAGE_SYM_TYPE_NULL
56     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
57     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
58   - Name:            exportfn2
59     Value:           16
60     SectionNumber:   1
61     SimpleType:      IMAGE_SYM_TYPE_NULL
62     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
63     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
64   - Name:            exportfn3
65     Value:           24
66     SectionNumber:   1
67     SimpleType:      IMAGE_SYM_TYPE_NULL
68     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
69     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
70 ...