Skip to content
Snippets Groups Projects
Commit fed750ff authored by Rui Ueyama's avatar Rui Ueyama
Browse files

[PECOFF][Writer] Skip ".debug$S" section in the input object file.

llvm-svn: 185129
parent d059f360
No related branches found
No related tags found
No related merge requests found
......@@ -191,6 +191,13 @@ private:
return ec;
uint64_t ordinal = 0;
// We do not support debug information yet. We could keep data in ".debug$S"
// section in the resultant binary by copying as opaque bytes, but it would
// make the binary hard to debug because of extraneous data. So we'll skip
// the debug info.
if (sectionName == ".debug$S")
return error_code::success();
// Create an atom for the entire section.
if (symbols.empty()) {
ArrayRef<uint8_t> Data(SecData.data(), SecData.size());
......
......@@ -42,9 +42,9 @@ CHECK: }
CHECK: Section {
CHECK: Number: 3
CHECK: Name: .data (2E 64 61 74 61 00 00 00)
CHECK: VirtualSize: 0x74
CHECK: VirtualSize: 0x0
CHECK: VirtualAddress: 0x3000
CHECK: RawDataSize: 116
CHECK: RawDataSize: 0
CHECK: PointerToRawData: 0x600
CHECK: PointerToRelocations: 0x0
CHECK: PointerToLineNumbers: 0x0
......
......@@ -39,7 +39,7 @@ FILE: MajorImageVersion: 0
FILE: MinorImageVersion: 0
FILE: MajorSubsystemVersion: 3
FILE: MinorSubsystemVersion: 11
FILE: SizeOfImage: 8192
FILE: SizeOfImage: 4096
FILE: SizeOfHeaders: 512
FILE: Subsystem: IMAGE_SUBSYSTEM_WINDOWS_CUI (0x3)
FILE: Subsystem [ (0x8540)
......@@ -97,9 +97,9 @@ SECTIONS: }
SECTIONS: Section {
SECTIONS: Number: 3
SECTIONS: Name: .data (2E 64 61 74 61 00 00 00)
SECTIONS: VirtualSize: 0x6C
SECTIONS: VirtualSize: 0x0
SECTIONS: VirtualAddress: 0x2000
SECTIONS: RawDataSize: 108
SECTIONS: RawDataSize: 0
SECTIONS: PointerToRawData: 0x400
SECTIONS: PointerToRelocations: 0x0
SECTIONS: PointerToLineNumbers: 0x0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment