1 # RUN: yaml2obj %s -o %t.obj
3 # RUN: lld-link /out:%t.exe /entry:main %t.obj
4 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=DEFAULT-HEADER %s
5 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=DEFAULT-TEXT %s
7 # DEFAULT-HEADER: ImageBase: 0x140000000
8 # DEFAULT-TEXT: Contents of section .text:
9 # DEFAULT-TEXT-NEXT: 1000 00000040 01000000
11 # RUN: lld-link /out:%t.exe /entry:main %t.obj /base:0x280000000
12 # RUN: llvm-readobj --file-headers %t.exe | FileCheck -check-prefix=BASE-HEADER %s
13 # RUN: llvm-objdump -s %t.exe | FileCheck --check-prefix=BASE-TEXT %s
15 # BASE-HEADER: ImageBase: 0x280000000
16 # BASE-TEXT: Contents of section .text:
17 # BASE-TEXT-NEXT: 1000 00000080 02000000
21 Machine: IMAGE_FILE_MACHINE_AMD64
25 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
27 SectionData: 0000000000000000
30 SymbolName: __ImageBase
31 Type: IMAGE_REL_AMD64_ADDR64
36 SimpleType: IMAGE_SYM_TYPE_NULL
37 ComplexType: IMAGE_SYM_DTYPE_NULL
38 StorageClass: IMAGE_SYM_CLASS_STATIC
41 NumberOfRelocations: 1
42 NumberOfLinenumbers: 0
48 SimpleType: IMAGE_SYM_TYPE_NULL
49 ComplexType: IMAGE_SYM_DTYPE_NULL
50 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
54 SimpleType: IMAGE_SYM_TYPE_NULL
55 ComplexType: IMAGE_SYM_DTYPE_NULL
56 StorageClass: IMAGE_SYM_CLASS_EXTERNAL