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 | 0f33be1b8797a36053782fdfa54e07810d64fe1e (patch) | |
tree | ef4368dd49730e8372cf8d4471ee1641bb298b02 /llvm/lib | |
parent | a8032e96b523a0ee40aabfe7f94f9836d6f2d6db (diff) | |
download | bcm5719-llvm-0f33be1b8797a36053782fdfa54e07810d64fe1e.tar.gz bcm5719-llvm-0f33be1b8797a36053782fdfa54e07810d64fe1e.zip |
Fix the defaults for .eh_frame. We were marking it as writable.
llvm-svn: 131951
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp index cb337d84dba..ff88b6f2e99 100644 --- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp +++ b/llvm/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()) |