[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / arm64-import2.test
blob342671211db87c125be74f63c653ecb2f9259526
1 # REQUIRES: aarch64
3 # RUN: yaml2obj %s -o %t.obj
4 # RUN: llvm-objdump --no-print-imm-hex -d %t.obj | FileCheck %s --check-prefix BEFORE
5 # RUN: lld-link /entry:main /subsystem:console /out:%t.exe %t.obj %p/Inputs/library-arm64.lib %p/Inputs/library2-arm64.lib
6 # RUN: llvm-objdump --no-print-imm-hex -d %t.exe | FileCheck %s --check-prefix AFTER
7 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck %s -check-prefix IMPORTS
9 # BEFORE: Disassembly of section .text:
10 # BEFORE-EMPTY:
11 # BEFORE:        0:       94000000        bl      0x0
12 # BEFORE:        4:       94000000        bl      0x4
13 # BEFORE:        8:       d65f03c0        ret
14 # BEFORE:        c:       ff              <unknown>
16 # AFTER: Disassembly of section .text:
17 # AFTER-EMPTY:
18 # AFTER:  140001000:      94000004        bl      0x140001010
19 # AFTER:  140001004:      94000006        bl      0x14000101c
20 # AFTER:  140001008:      d65f03c0        ret
21 # AFTER:  14000100c:      000000ff
22 # AFTER:  140001010:      b0000010        adrp    x16, 0x140002000
23 # AFTER:  140001014:      f9403210        ldr     x16, [x16, #96]
24 # AFTER:  140001018:      d61f0200        br      x16
25 # AFTER:  14000101c:      b0000010        adrp    x16, 0x140002000
26 # AFTER:  140001020:      f9403a10        ldr     x16, [x16, #112]
27 # AFTER:  140001024:      d61f0200        br      x16
29 # IMPORTS: Import {
30 # IMPORTS:   Name: library.dll
31 # IMPORTS:   ImportLookupTableRVA: 0x2040
32 # IMPORTS:   ImportAddressTableRVA: 0x2060
33 # IMPORTS:   Symbol: function (2)
34 # IMPORTS: }
35 # IMPORTS: Import {
36 # IMPORTS:   Name: library2.dll
37 # IMPORTS:   ImportLookupTableRVA: 0x2050
38 # IMPORTS:   ImportAddressTableRVA: 0x2070
39 # IMPORTS:   Symbol: function2 (0)
40 # IMPORTS: }
42 --- !COFF
43 header:
44   Machine:         IMAGE_FILE_MACHINE_ARM64
45   Characteristics: [  ]
46 sections:
47   - Name:            .text
48     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
49     Alignment:       4
50     SectionData:     0000009400000094C0035FD6FF
51     Relocations:
52       - VirtualAddress:  0
53         SymbolName:      function
54         Type:            IMAGE_REL_ARM64_BRANCH26
55       - VirtualAddress:  4
56         SymbolName:      function2
57         Type:            IMAGE_REL_ARM64_BRANCH26
58 symbols:
59   - Name:            .text
60     Value:           0
61     SectionNumber:   1
62     SimpleType:      IMAGE_SYM_TYPE_NULL
63     ComplexType:     IMAGE_SYM_DTYPE_NULL
64     StorageClass:    IMAGE_SYM_CLASS_STATIC
65     SectionDefinition:
66       Length:          12
67       NumberOfRelocations: 2
68       NumberOfLinenumbers: 0
69       CheckSum:        1438860354
70       Number:          1
71   - Name:            main
72     Value:           0
73     SectionNumber:   1
74     SimpleType:      IMAGE_SYM_TYPE_NULL
75     ComplexType:     IMAGE_SYM_DTYPE_NULL
76     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
77   - Name:            function
78     Value:           0
79     SectionNumber:   0
80     SimpleType:      IMAGE_SYM_TYPE_NULL
81     ComplexType:     IMAGE_SYM_DTYPE_NULL
82     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
83   - Name:            function2
84     Value:           0
85     SectionNumber:   0
86     SimpleType:      IMAGE_SYM_TYPE_NULL
87     ComplexType:     IMAGE_SYM_DTYPE_NULL
88     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
89 ...