[llvm-commits] [llvm] r143044 - /llvm/trunk/lib/MC/MCObjectFileInfo.cpp

Nick Lewycky nicholas at mxc.ca
Wed Oct 26 11:44:32 PDT 2011


Author: nicholas
Date: Wed Oct 26 13:44:32 2011
New Revision: 143044

URL: http://llvm.org/viewvc/llvm-project?rev=143044&view=rev
Log:
On an ELF system, ".debug_str" is mergeable and contains null terminated strings
composed of one byte characters.

Modified:
    llvm/trunk/lib/MC/MCObjectFileInfo.cpp

Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=143044&r1=143043&r2=143044&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Wed Oct 26 13:44:32 2011
@@ -354,8 +354,9 @@
     Ctx->getELFSection(".debug_pubtypes", ELF::SHT_PROGBITS, 0,
                        SectionKind::getMetadata());
   DwarfStrSection =
-    Ctx->getELFSection(".debug_str", ELF::SHT_PROGBITS, 0,
-                       SectionKind::getMetadata());
+    Ctx->getELFSection(".debug_str", ELF::SHT_PROGBITS,
+                       ELF::SHF_MERGE | ELF::SHF_STRINGS,
+                       SectionKind::getMergeable1ByteCString());
   DwarfLocSection =
     Ctx->getELFSection(".debug_loc", ELF::SHT_PROGBITS, 0,
                        SectionKind::getMetadata());





More information about the llvm-commits mailing list