• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# REQUIRES: lld
2# RUN: yaml2obj %s -o %t.obj
3#
4# RUN: lld-link /machine:x64 /out:%t.dll /noentry /nodefaultlib /debug /dll %t.obj /export:DllFunc
5#
6# RUN: lldb-test object-file %t.dll | FileCheck -check-prefix=BASIC-CHECK %s
7# RUN: lldb-test object-file -dep-modules %t.dll | FileCheck -check-prefix=DEPS %s
8
9# BASIC-CHECK: Plugin name: pe-coff
10
11# UUID should not be empty if the module is built with debug info.
12# BASIC-CHECK-DAG: UUID: {{[0-9A-F]{7,}[0-9A-F]}}-{{.*}}
13
14# BASIC-CHECK: Showing 4 sections
15#
16# BASIC-CHECK:  Index: 0
17# BASIC-CHECK:  Name: PECOFF header
18#
19# BASIC-CHECK:  Index: 1
20# BASIC-CHECK:  Name: .text
21# BASIC-CHECK:  Type: code
22# BASIC-CHECK:  VM size: 22
23# BASIC-CHECK:  File size: 512
24#
25# BASIC-CHECK:  Index: 2
26# BASIC-CHECK:  Name: .rdata
27# BASIC-CHECK:  Type: data
28# BASIC-CHECK:  VM size: {{.}}
29# BASIC-CHECK:  File size: 512
30#
31# BASIC-CHECK:  Index: 3
32# BASIC-CHECK:  Name: .pdata
33# BASIC-CHECK:  Type: data
34# BASIC-CHECK:  VM size: 12
35# BASIC-CHECK:  File size: 512
36#
37# DEPS: Showing 0 dependent module(s)
38
39
40--- !COFF
41header:          
42  Machine:         IMAGE_FILE_MACHINE_AMD64
43  Characteristics: [  ]
44sections:        
45  - Name:            .text
46    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
47    Alignment:       16
48    SectionData:     50894C24048B4C24040FAF4C2404890C248B042459C3
49  - Name:            .data
50    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
51    Alignment:       4
52    SectionData:     ''
53  - Name:            .bss
54    Characteristics: [ IMAGE_SCN_CNT_UNINITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
55    Alignment:       4
56    SectionData:     ''
57  - Name:            .xdata
58    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
59    Alignment:       4
60    SectionData:     '0101010001020000'
61  - Name:            .drectve
62    Characteristics: [ IMAGE_SCN_LNK_INFO, IMAGE_SCN_LNK_REMOVE ]
63    Alignment:       1
64    SectionData:     202F44454641554C544C49423A6C6962636D742E6C6962202F44454641554C544C49423A6F6C646E616D65732E6C6962
65  - Name:            .pdata
66    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
67    Alignment:       4
68    SectionData:     '000000001600000000000000'
69    Relocations:     
70      - VirtualAddress:  0
71        SymbolName:      'DllFunc'
72        Type:            IMAGE_REL_AMD64_ADDR32NB
73      - VirtualAddress:  4
74        SymbolName:      'DllFunc'
75        Type:            IMAGE_REL_AMD64_ADDR32NB
76      - VirtualAddress:  8
77        SymbolName:      .xdata
78        Type:            IMAGE_REL_AMD64_ADDR32NB
79  - Name:            .llvm_addrsig
80    Characteristics: [ IMAGE_SCN_LNK_REMOVE ]
81    Alignment:       1
82    SectionData:     ''
83symbols:         
84  - Name:            .text
85    Value:           0
86    SectionNumber:   1
87    SimpleType:      IMAGE_SYM_TYPE_NULL
88    ComplexType:     IMAGE_SYM_DTYPE_NULL
89    StorageClass:    IMAGE_SYM_CLASS_STATIC
90    SectionDefinition: 
91      Length:          22
92      NumberOfRelocations: 0
93      NumberOfLinenumbers: 0
94      CheckSum:        3054557294
95      Number:          1
96  - Name:            .data
97    Value:           0
98    SectionNumber:   2
99    SimpleType:      IMAGE_SYM_TYPE_NULL
100    ComplexType:     IMAGE_SYM_DTYPE_NULL
101    StorageClass:    IMAGE_SYM_CLASS_STATIC
102    SectionDefinition: 
103      Length:          0
104      NumberOfRelocations: 0
105      NumberOfLinenumbers: 0
106      CheckSum:        0
107      Number:          2
108  - Name:            .bss
109    Value:           0
110    SectionNumber:   3
111    SimpleType:      IMAGE_SYM_TYPE_NULL
112    ComplexType:     IMAGE_SYM_DTYPE_NULL
113    StorageClass:    IMAGE_SYM_CLASS_STATIC
114    SectionDefinition: 
115      Length:          0
116      NumberOfRelocations: 0
117      NumberOfLinenumbers: 0
118      CheckSum:        0
119      Number:          3
120  - Name:            .xdata
121    Value:           0
122    SectionNumber:   4
123    SimpleType:      IMAGE_SYM_TYPE_NULL
124    ComplexType:     IMAGE_SYM_DTYPE_NULL
125    StorageClass:    IMAGE_SYM_CLASS_STATIC
126    SectionDefinition: 
127      Length:          8
128      NumberOfRelocations: 0
129      NumberOfLinenumbers: 0
130      CheckSum:        448359300
131      Number:          4
132  - Name:            .drectve
133    Value:           0
134    SectionNumber:   5
135    SimpleType:      IMAGE_SYM_TYPE_NULL
136    ComplexType:     IMAGE_SYM_DTYPE_NULL
137    StorageClass:    IMAGE_SYM_CLASS_STATIC
138    SectionDefinition: 
139      Length:          48
140      NumberOfRelocations: 0
141      NumberOfLinenumbers: 0
142      CheckSum:        149686238
143      Number:          5
144  - Name:            .pdata
145    Value:           0
146    SectionNumber:   6
147    SimpleType:      IMAGE_SYM_TYPE_NULL
148    ComplexType:     IMAGE_SYM_DTYPE_NULL
149    StorageClass:    IMAGE_SYM_CLASS_STATIC
150    SectionDefinition: 
151      Length:          12
152      NumberOfRelocations: 3
153      NumberOfLinenumbers: 0
154      CheckSum:        3134470316
155      Number:          6
156  - Name:            .llvm_addrsig
157    Value:           0
158    SectionNumber:   7
159    SimpleType:      IMAGE_SYM_TYPE_NULL
160    ComplexType:     IMAGE_SYM_DTYPE_NULL
161    StorageClass:    IMAGE_SYM_CLASS_STATIC
162    SectionDefinition: 
163      Length:          0
164      NumberOfRelocations: 0
165      NumberOfLinenumbers: 0
166      CheckSum:        0
167      Number:          7
168  - Name:            '@feat.00'
169    Value:           0
170    SectionNumber:   -1
171    SimpleType:      IMAGE_SYM_TYPE_NULL
172    ComplexType:     IMAGE_SYM_DTYPE_NULL
173    StorageClass:    IMAGE_SYM_CLASS_STATIC
174  - Name:            'DllFunc'
175    Value:           0
176    SectionNumber:   1
177    SimpleType:      IMAGE_SYM_TYPE_NULL
178    ComplexType:     IMAGE_SYM_DTYPE_FUNCTION
179    StorageClass:    IMAGE_SYM_CLASS_EXTERNAL
180...
181