[llvm-commits] [llvm] r131951 - in /llvm/trunk: lib/CodeGen/TargetLoweringObjectFileImpl.cpp test/CodeGen/X86/eh_frame.ll
Rafael Espindola
rafael.espindola at gmail.com
Mon May 23 19:50:20 PDT 2011
Author: rafael
Date: Mon May 23 21:50:20 2011
New Revision: 131951
URL: http://llvm.org/viewvc/llvm-project?rev=131951&view=rev
Log:
Fix the defaults for .eh_frame. We were marking it as writable.
Added:
llvm/trunk/test/CodeGen/X86/eh_frame.ll
Modified:
llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
Modified: llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp?rev=131951&r1=131950&r2=131951&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp (original)
+++ llvm/trunk/lib/CodeGen/TargetLoweringObjectFileImpl.cpp Mon May 23 21:50:20 2011
@@ -255,7 +255,7 @@
return SectionKind::getThreadBSS();
if (Name == ".eh_frame")
- return SectionKind::getDataRel();
+ return SectionKind::getReadOnlyWithRel();
return K;
}
@@ -289,7 +289,7 @@
if (K.isText())
Flags |= ELF::SHF_EXECINSTR;
- if (K.isWriteable())
+ if (K.isWriteable() && !K.isReadOnlyWithRel())
Flags |= ELF::SHF_WRITE;
if (K.isThreadLocal())
Added: llvm/trunk/test/CodeGen/X86/eh_frame.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/eh_frame.ll?rev=131951&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/X86/eh_frame.ll (added)
+++ llvm/trunk/test/CodeGen/X86/eh_frame.ll Mon May 23 21:50:20 2011
@@ -0,0 +1,5 @@
+; RUN: llc < %s -mtriple x86_64-unknown-linux-gnu | FileCheck %s
+
+ at __FRAME_END__ = constant [1 x i32] zeroinitializer, section ".eh_frame"
+
+; CHECK: .section .eh_frame,"a", at progbits
More information about the llvm-commits
mailing list