[memprof] Remove an unused using directive (#117004)
[llvm-project.git] / lld / test / COFF / hello32.test
blob744834eb98aa6a9d8e02065eab72c33a08f9083d
1 # RUN: yaml2obj %p/Inputs/hello32.yaml -o %t.obj
2 # RUN: lld-link -safeseh:no %t.obj %p/Inputs/std32.lib /subsystem:console \
3 # RUN:   /entry:main@0 /out:%t.exe /appcontainer
4 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=HEADER %s
5 # RUN: llvm-readobj --coff-imports %t.exe | FileCheck -check-prefix=IMPORTS %s
6 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
8 HEADER:      Format: COFF-i386
9 HEADER-NEXT: Arch: i386
10 HEADER-NEXT: AddressSize: 32bit
11 HEADER-NEXT: ImageFileHeader {
12 HEADER-NEXT:   Machine: IMAGE_FILE_MACHINE_I386 (0x14C)
13 HEADER-NEXT:   SectionCount: 4
14 HEADER-NEXT:   TimeDateStamp: 
15 HEADER-NEXT:   PointerToSymbolTable: 0x0
16 HEADER-NEXT:   SymbolCount: 0
17 HEADER-NEXT:   StringTableSize: 0
18 HEADER-NEXT:   OptionalHeaderSize: 224
19 HEADER-NEXT:   Characteristics [ (0x102)
20 HEADER-NEXT:     IMAGE_FILE_32BIT_MACHINE (0x100)
21 HEADER-NEXT:     IMAGE_FILE_EXECUTABLE_IMAGE (0x2)
22 HEADER-NEXT:   ]
23 HEADER-NEXT: }
24 HEADER-NEXT: ImageOptionalHeader {
25 HEADER-NEXT:   Magic: 0x10B
26 HEADER-NEXT:   MajorLinkerVersion: 14
27 HEADER-NEXT:   MinorLinkerVersion: 0
28 HEADER-NEXT:   SizeOfCode: 512
29 HEADER-NEXT:   SizeOfInitializedData: 1536
30 HEADER-NEXT:   SizeOfUninitializedData: 0
31 HEADER-NEXT:   AddressOfEntryPoint: 0x1000
32 HEADER-NEXT:   BaseOfCode: 0x1000
33 HEADER-NEXT:   BaseOfData: 0x0
34 HEADER-NEXT:   ImageBase: 0x400000
35 HEADER-NEXT:   SectionAlignment: 4096
36 HEADER-NEXT:   FileAlignment: 512
37 HEADER-NEXT:   MajorOperatingSystemVersion: 6
38 HEADER-NEXT:   MinorOperatingSystemVersion: 0
39 HEADER-NEXT:   MajorImageVersion: 0
40 HEADER-NEXT:   MinorImageVersion: 0
41 HEADER-NEXT:   MajorSubsystemVersion: 6
42 HEADER-NEXT:   MinorSubsystemVersion: 0
43 HEADER-NEXT:   SizeOfImage: 20480
44 HEADER-NEXT:   SizeOfHeaders: 1024
45 HEADER-NEXT:   CheckSum: 0x0
46 HEADER-NEXT:   Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
47 HEADER-NEXT:   Characteristics [ (0x9140)
48 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_APPCONTAINER (0x1000)
49 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE (0x40)
50 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_NX_COMPAT (0x100)
51 HEADER-NEXT:     IMAGE_DLL_CHARACTERISTICS_TERMINAL_SERVER_AWARE (0x8000)
52 HEADER-NEXT:   ]
53 HEADER-NEXT:   SizeOfStackReserve: 1048576
54 HEADER-NEXT:   SizeOfStackCommit: 4096
55 HEADER-NEXT:   SizeOfHeapReserve: 1048576
56 HEADER-NEXT:   SizeOfHeapCommit: 4096
57 HEADER-NEXT:   NumberOfRvaAndSize: 16
58 HEADER-NEXT:   DataDirectory {
59 HEADER-NEXT:     ExportTableRVA: 0x0
60 HEADER-NEXT:     ExportTableSize: 0x0
61 HEADER-NEXT:     ImportTableRVA: 0x2000
62 HEADER-NEXT:     ImportTableSize: 0x28
63 HEADER-NEXT:     ResourceTableRVA: 0x0
64 HEADER-NEXT:     ResourceTableSize: 0x0
65 HEADER-NEXT:     ExceptionTableRVA: 0x0
66 HEADER-NEXT:     ExceptionTableSize: 0x0
67 HEADER-NEXT:     CertificateTableRVA: 0x0
68 HEADER-NEXT:     CertificateTableSize: 0x0
69 HEADER-NEXT:     BaseRelocationTableRVA: 0x4000
70 HEADER-NEXT:     BaseRelocationTableSize: 0x10
71 HEADER-NEXT:     DebugRVA: 0x0
72 HEADER-NEXT:     DebugSize: 0x0
73 HEADER-NEXT:     ArchitectureRVA: 0x0
74 HEADER-NEXT:     ArchitectureSize: 0x0
75 HEADER-NEXT:     GlobalPtrRVA: 0x0
76 HEADER-NEXT:     GlobalPtrSize: 0x0
77 HEADER-NEXT:     TLSTableRVA: 0x0
78 HEADER-NEXT:     TLSTableSize: 0x0
79 HEADER-NEXT:     LoadConfigTableRVA: 0x0
80 HEADER-NEXT:     LoadConfigTableSize: 0x0
81 HEADER-NEXT:     BoundImportRVA: 0x0
82 HEADER-NEXT:     BoundImportSize: 0x0
83 HEADER-NEXT:     IATRVA: 0x2034
84 HEADER-NEXT:     IATSize: 0xC
85 HEADER-NEXT:     DelayImportDescriptorRVA: 0x0
86 HEADER-NEXT:     DelayImportDescriptorSize: 0x0
87 HEADER-NEXT:     CLRRuntimeHeaderRVA: 0x0
88 HEADER-NEXT:     CLRRuntimeHeaderSize: 0x0
89 HEADER-NEXT:     ReservedRVA: 0x0
90 HEADER-NEXT:     ReservedSize: 0x0
91 HEADER-NEXT:   }
92 HEADER-NEXT: }
93 HEADER-NEXT: DOSHeader {
94 HEADER-NEXT:   Magic: MZ
95 HEADER-NEXT:   UsedBytesInTheLastPage: 120
96 HEADER-NEXT:   FileSizeInPages: 1
97 HEADER-NEXT:   NumberOfRelocationItems: 0
98 HEADER-NEXT:   HeaderSizeInParagraphs: 4
99 HEADER-NEXT:   MinimumExtraParagraphs: 0
100 HEADER-NEXT:   MaximumExtraParagraphs: 0
101 HEADER-NEXT:   InitialRelativeSS: 0
102 HEADER-NEXT:   InitialSP: 0
103 HEADER-NEXT:   Checksum: 0
104 HEADER-NEXT:   InitialIP: 0
105 HEADER-NEXT:   InitialRelativeCS: 0
106 HEADER-NEXT:   AddressOfRelocationTable: 64
107 HEADER-NEXT:   OverlayNumber: 0
108 HEADER-NEXT:   OEMid: 0
109 HEADER-NEXT:   OEMinfo: 0
110 HEADER-NEXT:   AddressOfNewExeHeader: 120
111 HEADER-NEXT: }
113 IMPORTS: Format: COFF-i386
114 IMPORTS: Arch: i386
115 IMPORTS: AddressSize: 32bit
116 IMPORTS: Import {
117 IMPORTS:   Name: std32.dll
118 IMPORTS:   ImportLookupTableRVA: 0x2028
119 IMPORTS:   ImportAddressTableRVA: 0x2034
120 IMPORTS:   Symbol: ExitProcess (0)
121 IMPORTS:   Symbol: MessageBoxA (1)
122 IMPORTS: }
124 BASEREL: BaseReloc [
125 BASEREL:   Entry {
126 BASEREL:     Type: HIGHLOW
127 BASEREL:     Address: 0x1005
128 BASEREL:   }
129 BASEREL:   Entry {
130 BASEREL:     Type: HIGHLOW
131 BASEREL:     Address: 0x100C
132 BASEREL:   }
133 BASEREL: ]