diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-24 02:50:20 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2011-05-24 02:50:20 +0000 |
commit | 10c3e128efc9a2efd28414400827fa8b457def4d (patch) | |
tree | a5641aa13920dfffc65e27f645ed901851870d07 /lib/CodeGen/TargetLoweringObjectFileImpl.cpp | |
parent | b5a55d979c84e100f383ce11c5c5e3b616b9dcc4 (diff) |
Fix the defaults for .eh_frame. We were marking it as writable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131951 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r-- | lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index cb337d84db..ff88b6f2e9 100644 --- a/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/lib/CodeGen/TargetLoweringObjectFileImpl.cpp @@ -255,7 +255,7 @@ getELFKindForNamedSection(StringRef Name, SectionKind K) { return SectionKind::getThreadBSS(); if (Name == ".eh_frame") - return SectionKind::getDataRel(); + return SectionKind::getReadOnlyWithRel(); return K; } @@ -289,7 +289,7 @@ getELFSectionFlags(SectionKind K) { if (K.isText()) Flags |= ELF::SHF_EXECINSTR; - if (K.isWriteable()) + if (K.isWriteable() && !K.isReadOnlyWithRel()) Flags |= ELF::SHF_WRITE; if (K.isThreadLocal()) |