aboutsummaryrefslogtreecommitdiffstats
path: root/lib/MC/MCObjectFileInfo.cpp
diff options
context:
space:
mode:
authorDavid Chisnall <csdavec@swan.ac.uk>2012-02-17 17:31:15 +0000
committerDavid Chisnall <csdavec@swan.ac.uk>2012-02-17 17:31:15 +0000
commit4cbcee16187ab07a70280fc10af327767325b848 (patch)
treea42476bbae2af577850c4775462f3744f2c3c05a /lib/MC/MCObjectFileInfo.cpp
parent8bb51ef6d2a396715f1dbc6edc1599892779e4d6 (diff)
downloadexternal_llvm-4cbcee16187ab07a70280fc10af327767325b848.zip
external_llvm-4cbcee16187ab07a70280fc10af327767325b848.tar.gz
external_llvm-4cbcee16187ab07a70280fc10af327767325b848.tar.bz2
Generate the correct EH frame section types on Solaris, this time without breaking other platforms...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC/MCObjectFileInfo.cpp')
-rw-r--r--lib/MC/MCObjectFileInfo.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp
index 1b86535..1a27df5 100644
--- a/lib/MC/MCObjectFileInfo.cpp
+++ b/lib/MC/MCObjectFileInfo.cpp
@@ -258,6 +258,13 @@ void MCObjectFileInfo::InitELFMCObjectFileInfo(Triple T) {
}
}
+ // Solaris requires different flags for .eh_frame to seemingly every other
+ // platform.
+ EHSectionFlags = ELF::SHF_ALLOC;
+ if (T.getOS() == Triple::Solaris)
+ EHSectionFlags |= ELF::SHF_WRITE;
+
+
// ELF
BSSSection =
Ctx->getELFSection(".bss", ELF::SHT_NOBITS,
@@ -559,7 +566,7 @@ void MCObjectFileInfo::InitEHFrameSection() {
else if (Env == IsELF)
EHFrameSection =
Ctx->getELFSection(".eh_frame", ELF::SHT_PROGBITS,
- ELF::SHF_ALLOC,
+ EHSectionFlags,
SectionKind::getDataRel());
else
EHFrameSection =