• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# RUN: yaml2obj %s -o %t.obj
2# RUN: lld-link /out:%t.exe /entry:main %t.obj
3# RUN: llvm-objdump -s %t.exe | FileCheck %s
4# RUN: llvm-readobj --coff-basereloc %t.exe | FileCheck -check-prefix=BASEREL %s
5
6# CHECK:      Contents of section .text:
7# CHECK-NEXT: 1000 00200000
8# CHECK:      Contents of section .rdata:
9# CHECK-NEXT: 2000 04100040 01000000
10
11# BASEREL:      BaseReloc [
12# BASEREL-NEXT:   Entry {
13# BASEREL-NEXT:     Type: DIR64
14# BASEREL-NEXT:     Address: 0x2000
15# BASEREL-NEXT:   }
16# BASEREL-NEXT:   Entry {
17# BASEREL-NEXT:     Type: ABSOLUTE
18# BASEREL-NEXT:     Address: 0x2000
19# BASEREL-NEXT:   }
20# BASEREL-NEXT: ]
21
22--- !COFF
23header:
24  Machine:         IMAGE_FILE_MACHINE_ARM64
25  Characteristics: []
26sections:
27  - Name:            .text
28    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
29    Alignment:       4
30    SectionData:     00000000
31    Relocations:
32      - VirtualAddress:  0
33        SymbolName:      __imp_main
34        Type:            IMAGE_REL_ARM64_ADDR32NB
35symbols:
36  - Name:            .text
37    Value:           0
38    SectionNumber:   1
39    SimpleType:      IMAGE_SYM_TYPE_NULL
40    ComplexType:     IMAGE_SYM_DTYPE_NULL
41    StorageClass:    IMAGE_SYM_CLASS_STATIC
42    SectionDefinition:
43      Length:          4
44      NumberOfRelocations: 1
45      NumberOfLinenumbers: 0
46      CheckSum:        0
47      Number:          0
48      Selection:       IMAGE_COMDAT_SELECT_ANY
49  - Name:            main
50    Value:           4
51    SectionNumber:   1
52    SimpleType:      IMAGE_SYM_TYPE_NULL
53    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
54    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
55  - Name:            __imp_main
56    Value:           0
57    SectionNumber:   0
58    SimpleType:      IMAGE_SYM_TYPE_NULL
59    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
60    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
61...
62