2 # RUN: yaml2obj %s -o %t.dir/foo.obj
4 # RUN: rm -f %t.dir/foo.sys
5 # RUN: cd %t.dir; lld-link /driver foo.obj
6 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=DRIVER %s
8 # DRIVER-NOT: IMAGE_FILE_UP_SYSTEM_ONLY
9 # DRIVER-NOT: IMAGE_DLL_CHARACTERISTICS_WDM_DRIVER
10 # DRIVER: AddressOfEntryPoint: 0x1000
12 # RUN: rm -f %t.dir/foo.sys
13 # RUN: cd %t.dir; lld-link /driver:uponly foo.obj
14 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=UPONLY %s
16 # UPONLY: IMAGE_FILE_UP_SYSTEM_ONLY
17 # UPONLY: AddressOfEntryPoint: 0x1000
19 # RUN: rm -f %t.dir/foo.sys
20 # RUN: cd %t.dir; lld-link /driver:wdm foo.obj
21 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=WDM %s
23 # WDM: AddressOfEntryPoint: 0x1004
24 # WDM: IMAGE_DLL_CHARACTERISTICS_WDM_DRIVER
26 # RUN: rm -f %t.dir/foo.sys
27 # RUN: cd %t.dir; lld-link /driver:wdm,uponly foo.obj
28 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=BOTH %s
30 # RUN: rm -f %t.dir/foo.sys
31 # RUN: cd %t.dir; lld-link /driver:uponly,wdm foo.obj
32 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=BOTH %s
34 # BOTH: IMAGE_FILE_UP_SYSTEM_ONLY
35 # BOTH: AddressOfEntryPoint: 0x1004
36 # BOTH: IMAGE_DLL_CHARACTERISTICS_WDM_DRIVER
38 # RUN: rm -f %t.dir/foo.sys
39 # RUN: cd %t.dir; lld-link /driver foo.obj
40 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=FIXED1 %s
42 # RUN: rm -f %t.dir/foo.sys
43 # RUN: cd %t.dir; lld-link /driver foo.obj /fixed:no
44 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=FIXED1 %s
46 # FIXED1: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
48 # RUN: rm -f %t.dir/foo.sys
49 # RUN: cd %t.dir; lld-link /driver foo.obj /fixed
50 # RUN: llvm-readobj --file-headers %t.dir/foo.sys | FileCheck -check-prefix=FIXED2 %s
52 # FIXED2-NOT: IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE
56 Machine
: IMAGE_FILE_MACHINE_AMD64
60 Characteristics
: [ IMAGE_SCN_CNT_CODE
, IMAGE_SCN_MEM_EXECUTE
, IMAGE_SCN_MEM_READ
]
62 SectionData
: 0000000000000000
65 SymbolName
: __ImageBase
66 Type
: IMAGE_REL_AMD64_ADDR64
71 SimpleType
: IMAGE_SYM_TYPE_NULL
72 ComplexType
: IMAGE_SYM_DTYPE_NULL
73 StorageClass
: IMAGE_SYM_CLASS_STATIC
76 NumberOfRelocations
: 1
77 NumberOfLinenumbers
: 0
83 SimpleType
: IMAGE_SYM_TYPE_NULL
84 ComplexType
: IMAGE_SYM_DTYPE_NULL
85 StorageClass
: IMAGE_SYM_CLASS_EXTERNAL
86 - Name
: mainCRTStartup
89 SimpleType
: IMAGE_SYM_TYPE_NULL
90 ComplexType
: IMAGE_SYM_DTYPE_NULL
91 StorageClass
: IMAGE_SYM_CLASS_EXTERNAL
92 - Name
: _NtProcessStartup
95 SimpleType
: IMAGE_SYM_TYPE_NULL
96 ComplexType
: IMAGE_SYM_DTYPE_NULL
97 StorageClass
: IMAGE_SYM_CLASS_EXTERNAL