the .eh_frame sections we generate need to be writable (which
authorChris Lattner <sabre@nondot.org>
Sat, 15 Aug 2009 16:54:02 +0000 (16:54 +0000)
committerChris Lattner <sabre@nondot.org>
Sat, 15 Aug 2009 16:54:02 +0000 (16:54 +0000)
is why they are datarel).  This should fix PR4724, and is fallout
from r78890.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79111 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/TargetLoweringObjectFile.cpp

index a695e2412cf84ba95d1ef29f6ddbf5c875762488..d64cf07b01ea601271ed3a5710ad4b018a869eb9 100644 (file)
@@ -392,7 +392,8 @@ void TargetLoweringObjectFileELF::Initialize(MCContext &Ctx,
                   MCSectionELF::SHF_ALLOC, SectionKind::getReadOnly());
   EHFrameSection =
     getELFSection(".eh_frame", MCSectionELF::SHT_PROGBITS, 
-                  MCSectionELF::SHF_ALLOC, SectionKind::getDataRel());
+                  MCSectionELF::SHF_ALLOC | MCSectionELF::SHF_WRITE,
+                  SectionKind::getDataRel());
   
   // Debug Info Sections.
   DwarfAbbrevSection =