From 0f33be1b8797a36053782fdfa54e07810d64fe1e Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Tue, 24 May 2011 02:50:20 +0000 Subject: Fix the defaults for .eh_frame. We were marking it as writable. llvm-svn: 131951 --- llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp') 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()) -- cgit v1.2.3