[lld] r185129 - [PECOFF][Writer] Skip ".debug$S" section in the input object file.
Rui Ueyama
ruiu at google.com
Thu Jun 27 21:06:49 PDT 2013
Author: ruiu
Date: Thu Jun 27 23:06:49 2013
New Revision: 185129
URL: http://llvm.org/viewvc/llvm-project?rev=185129&view=rev
Log:
[PECOFF][Writer] Skip ".debug$S" section in the input object file.
Modified:
lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
lld/trunk/test/pecoff/hello.test
lld/trunk/test/pecoff/trivial.test
Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=185129&r1=185128&r2=185129&view=diff
==============================================================================
--- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
+++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Thu Jun 27 23:06:49 2013
@@ -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());
Modified: lld/trunk/test/pecoff/hello.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/hello.test?rev=185129&r1=185128&r2=185129&view=diff
==============================================================================
--- lld/trunk/test/pecoff/hello.test (original)
+++ lld/trunk/test/pecoff/hello.test Thu Jun 27 23:06:49 2013
@@ -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
Modified: lld/trunk/test/pecoff/trivial.test
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/trivial.test?rev=185129&r1=185128&r2=185129&view=diff
==============================================================================
--- lld/trunk/test/pecoff/trivial.test (original)
+++ lld/trunk/test/pecoff/trivial.test Thu Jun 27 23:06:49 2013
@@ -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
More information about the llvm-commits
mailing list