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

llvm-svn: 185129
This commit is contained in:
Rui Ueyama 2013-06-28 04:06:49 +00:00
parent d059f360a3
commit fed750ff3b
3 changed files with 12 additions and 5 deletions

View File

@ -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());

View File

@ -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

View File

@ -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