[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / delayimports-armnt.yaml
blobea96d864ef53d5ff3e9763c49d9037df1d305137
1 # REQUIRES: arm
2 # RUN: yaml2obj %s -o %t.obj
3 # RUN: lld-link %t.obj %p/Inputs/library.lib /subsystem:console \
4 # RUN:   /entry:mainCRTStartup /alternatename:__delayLoadHelper2=mainCRTStartup \
5 # RUN:   /delayload:library.dll /out:%t.exe
6 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORT %s
7 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
8 # RUN: llvm-objdump --no-print-imm-hex -d %t.exe | FileCheck --check-prefix=DISASM %s
9 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DIR %s
11 # IMPORT:      Format: COFF-ARM
12 # IMPORT-NEXT: Arch: thumb
13 # IMPORT-NEXT: AddressSize: 32bit
14 # IMPORT-NEXT: DelayImport {
15 # IMPORT-NEXT:   Name: library.dll
16 # IMPORT-NEXT:   Attributes: 0x1
17 # IMPORT-NEXT:   ModuleHandle: 0x3008
18 # IMPORT-NEXT:   ImportAddressTable: 0x3010
19 # IMPORT-NEXT:   ImportNameTable: 0x2044
20 # IMPORT-NEXT:   BoundDelayImportTable: 0x0
21 # IMPORT-NEXT:   UnloadDelayImportTable: 0x0
22 # IMPORT-NEXT:   Import {
23 # IMPORT-NEXT:     Symbol: function (0)
24 # IMPORT-NEXT:     Address: 0x40100D
25 # IMPORT-NEXT:   }
26 # IMPORT-NEXT: }
28 # BASEREL:      BaseReloc [
29 # BASEREL-NEXT:   Entry {
30 # BASEREL-NEXT:     Type: ARM_MOV32(T)
31 # BASEREL-NEXT:     Address: 0x1000
32 # BASEREL-NEXT:   }
33 # BASEREL-NEXT:   Entry {
34 # BASEREL-NEXT:     Type: ARM_MOV32(T)
35 # BASEREL-NEXT:     Address: 0x100C
36 # BASEREL-NEXT:   }
37 # BASEREL-NEXT:   Entry {
38 # BASEREL-NEXT:     Type: ARM_MOV32(T)
39 # BASEREL-NEXT:     Address: 0x1026
40 # BASEREL-NEXT:   }
41 # BASEREL-NEXT:   Entry {
42 # BASEREL-NEXT:     Type: ABSOLUTE
43 # BASEREL-NEXT:     Address: 0x1000
44 # BASEREL-NEXT:   }
45 # BASEREL-NEXT:   Entry {
46 # BASEREL-NEXT:     Type: HIGHLOW
47 # BASEREL-NEXT:     Address: 0x3010
48 # BASEREL-NEXT:   }
49 # BASEREL-NEXT:   Entry {
50 # BASEREL-NEXT:     Type: ABSOLUTE
51 # BASEREL-NEXT:     Address: 0x3000
52 # BASEREL-NEXT:   }
53 # BASEREL-NEXT: ]
55 # DISASM:    00401000 <.text>:
56 # DISASM:      40100c:       f243 0c10       movw r12, #12304
57 # DISASM-NEXT:               f2c0 0c40       movt    r12, #64
58 # DISASM-NEXT:               f000 b800       b.w     {{.+}} @ imm = #0
59 # DISASM-NEXT:               e92d 480f       push.w  {r0, r1, r2, r3, r11, lr}
60 # DISASM-NEXT:               f20d 0b10       addw    r11, sp, #16
61 # DISASM-NEXT:               ed2d 0b10       vpush   {d0, d1, d2, d3, d4, d5, d6, d7}
62 # DISASM-NEXT:               4661            mov     r1, r12
63 # DISASM-NEXT:               f242 0004       movw r0, #8196
64 # DISASM-NEXT:               f2c0 0040       movt    r0, #64
65 # DISASM-NEXT:               f7ff ffe7       bl      0x401000 <.text>
66 # DISASM-NEXT:               4684            mov     r12, r0
67 # DISASM-NEXT:               ecbd 0b10       vpop    {d0, d1, d2, d3, d4, d5, d6, d7}
68 # DISASM-NEXT:               e8bd 480f       pop.w   {r0, r1, r2, r3, r11, lr}
69 # DISASM-NEXT:               4760            bx      r12
71 # DIR:         DelayImportDescriptorRVA: 0x2004
72 # DIR-NEXT:    DelayImportDescriptorSize: 0x40
75 --- !COFF
76 header:
77   Machine:         IMAGE_FILE_MACHINE_ARMNT
78   Characteristics: [  ]
79 sections:
80   - Name:            .text
81     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_PURGEABLE, IMAGE_SCN_MEM_16BIT, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
82     Alignment:       4
83     SectionData:     40F20000C0F2000000680047
84     Relocations:
85       - VirtualAddress:  0
86         SymbolName:      __imp_function
87         Type:            IMAGE_REL_ARM_MOV32T
88   - Name:            .rdata
89     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
90     Alignment:       1
91     SectionData:     01
92   - Name:            .data
93     Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
94     Alignment:       1
95     SectionData:     02
96 symbols:
97   - Name:            .text
98     Value:           0
99     SectionNumber:   1
100     SimpleType:      IMAGE_SYM_TYPE_NULL
101     ComplexType:     IMAGE_SYM_DTYPE_NULL
102     StorageClass:    IMAGE_SYM_CLASS_STATIC
103     SectionDefinition:
104       Length:          12
105       NumberOfRelocations: 1
106       NumberOfLinenumbers: 0
107       CheckSum:        0
108       Number:          1
109   - Name:            mainCRTStartup
110     Value:           0
111     SectionNumber:   1
112     SimpleType:      IMAGE_SYM_TYPE_NULL
113     ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
114     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
115   - Name:            __imp_function
116     Value:           0
117     SectionNumber:   0
118     SimpleType:      IMAGE_SYM_TYPE_NULL
119     ComplexType:     IMAGE_SYM_DTYPE_NULL
120     StorageClass:    IMAGE_SYM_CLASS_EXTERNAL