1 # RUN: yaml2obj %s -o %t.obj
2 # RUN: lld-link /out:%t.exe /entry:main %t.obj 2>&1 | FileCheck -check-prefix=WARN %s
3 # RUN: llvm-objdump -s %t.exe | FileCheck %s
4 # RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
6 # WARN: warning: [[INPUT:.+]]: locally defined symbol imported: main (defined in [[INPUT]])
8 # CHECK: Contents of section .text:
9 # CHECK-NEXT: 1000 00200000
10 # CHECK: Contents of section .rdata:
11 # CHECK-NEXT: 2000 04100040 01000000
13 # BASEREL: BaseReloc [
14 # BASEREL-NEXT: Entry {
15 # BASEREL-NEXT: Type: DIR64
16 # BASEREL-NEXT: Address: 0x2000
18 # BASEREL-NEXT: Entry {
19 # BASEREL-NEXT: Type: ABSOLUTE
20 # BASEREL-NEXT: Address: 0x2000
26 Machine: IMAGE_FILE_MACHINE_AMD64
30 Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
35 SymbolName: __imp_main
36 Type: IMAGE_REL_AMD64_ADDR32NB
41 SimpleType: IMAGE_SYM_TYPE_NULL
42 ComplexType: IMAGE_SYM_DTYPE_NULL
43 StorageClass: IMAGE_SYM_CLASS_STATIC
46 NumberOfRelocations: 1
47 NumberOfLinenumbers: 0
50 Selection: IMAGE_COMDAT_SELECT_ANY
54 SimpleType: IMAGE_SYM_TYPE_NULL
55 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
56 StorageClass: IMAGE_SYM_CLASS_EXTERNAL
60 SimpleType: IMAGE_SYM_TYPE_NULL
61 ComplexType: IMAGE_SYM_DTYPE_FUNCTION
62 StorageClass: IMAGE_SYM_CLASS_EXTERNAL