[llvm] r205059 - Debug Compression: Avoid compression debug_frame for now
David Blaikie
dblaikie at gmail.com
Fri Mar 28 14:48:32 PDT 2014
Author: dblaikie
Date: Fri Mar 28 16:48:31 2014
New Revision: 205059
URL: http://llvm.org/viewvc/llvm-project?rev=205059&view=rev
Log:
Debug Compression: Avoid compression debug_frame for now
Turns out debug_frame does use multiple fragments, so it doesn't
compress correctly with the current approach. Disable compressing it for
now while I figure out what's the best solution for it.
Modified:
llvm/trunk/lib/MC/MCContext.cpp
llvm/trunk/test/MC/ELF/compression.s
Modified: llvm/trunk/lib/MC/MCContext.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCContext.cpp?rev=205059&r1=205058&r2=205059&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCContext.cpp (original)
+++ llvm/trunk/lib/MC/MCContext.cpp Fri Mar 28 16:48:31 2014
@@ -253,7 +253,7 @@ getELFSection(StringRef Section, unsigne
SmallString<32> ZDebugName;
if (MAI->compressDebugSections() && Section.startswith(".debug_") &&
- Section != ".debug_frame")
+ Section != ".debug_frame" && Section != ".debug_line")
Section = (".z" + Section.drop_front(1)).toStringRef(ZDebugName);
// Do the lookup, if we have a hit, return it.
Modified: llvm/trunk/test/MC/ELF/compression.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/compression.s?rev=205059&r1=205058&r2=205059&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/compression.s (original)
+++ llvm/trunk/test/MC/ELF/compression.s Fri Mar 28 16:48:31 2014
@@ -2,14 +2,22 @@
// REQUIRES: zlib
-// CHECK: Contents of section .zdebug_line:
+// CHECK: Contents of section .debug_line:
+// FIXME: Figure out how to handle debug_line that currently uses multiple section fragments
+// CHECK-NOT: ZLIB
+
+// CHECK: Contents of section .zdebug_abbrev:
// Check for the 'ZLIB' file magic at the start of the section
// CHECK-NEXT: ZLIB
+
// We shouldn't compress the debug_frame section, since it can be relaxed
// CHECK: Contents of section .debug_frame
// CHECK-NOT: ZLIB
.section .debug_line,"", at progbits
+
+ .section .debug_abbrev,"", at progbits
+ .byte 1 # Abbreviation Code
.text
foo:
.cfi_startproc
More information about the llvm-commits
mailing list