File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
test/tools/llvm-objdump/XCOFF Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -338,6 +338,7 @@ class XCOFFObjectFile : public ObjectFile {
338
338
bool isSectionText (DataRefImpl Sec) const override ;
339
339
bool isSectionData (DataRefImpl Sec) const override ;
340
340
bool isSectionBSS (DataRefImpl Sec) const override ;
341
+ bool isDebugSection (DataRefImpl Sec) const override ;
341
342
342
343
bool isSectionVirtual (DataRefImpl Sec) const override ;
343
344
relocation_iterator section_rel_begin (DataRefImpl Sec) const override ;
Original file line number Diff line number Diff line change @@ -311,6 +311,11 @@ bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const {
311
311
return Flags & (XCOFF::STYP_BSS | XCOFF::STYP_TBSS);
312
312
}
313
313
314
+ bool XCOFFObjectFile::isDebugSection (DataRefImpl Sec) const {
315
+ uint32_t Flags = getSectionFlags (Sec);
316
+ return Flags & (XCOFF::STYP_DEBUG | XCOFF::STYP_DWARF);
317
+ }
318
+
314
319
bool XCOFFObjectFile::isSectionVirtual (DataRefImpl Sec) const {
315
320
return is64Bit () ? toSection64 (Sec)->FileOffsetToRawData == 0
316
321
: toSection32 (Sec)->FileOffsetToRawData == 0 ;
Original file line number Diff line number Diff line change 11
11
# CHECK-NEXT: 2 .bss 00000000 00000010 BSS
12
12
# CHECK-NEXT: 3 .tdata 00000004 00000000 DATA
13
13
# CHECK-NEXT: 4 .tbss 00000000 00000000 BSS
14
+ # CHECK-NEXT: 5 .dwline 00000046 00000000 DEBUG
15
+ # CHECK-NEXT: 6 .debug 00000046 00000000 DEBUG
14
16
15
17
--- !XCOFF
16
18
FileHeader:
@@ -33,6 +35,12 @@ Sections:
33
35
- Name: .tbss
34
36
Size: 0x0
35
37
Flags: [ STYP_TBSS ]
38
+ - Name: .dwline
39
+ Size: 0x46
40
+ Flags: [ STYP_DWARF ]
41
+ - Name: .debug
42
+ Size: 0x46
43
+ Flags: [ STYP_DEBUG ]
36
44
37
45
## Check the -h/--section-headers option prints long section names.
38
46
# RUN: yaml2obj %s --docnum=2 -o %t-longname.o
You can’t perform that action at this time.
0 commit comments