diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2012-02-17 17:31:15 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2012-02-17 17:31:15 +0000 |
commit | 07f8d3e4e9673285f162720ab46b772ae070e32a (patch) | |
tree | faba41a563793bff72b14e0823597acae7ce46c7 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 85dd309e855ec1edefff5dcc2e7c957e23f48f2f (diff) | |
download | llvm-07f8d3e4e9673285f162720ab46b772ae070e32a.zip llvm-07f8d3e4e9673285f162720ab46b772ae070e32a.tar.gz llvm-07f8d3e4e9673285f162720ab46b772ae070e32a.tar.bz2 |
Generate the correct EH frame section types on Solaris, this time without breaking other platforms...
llvm-svn: 150819
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 1b86535..1a27df5 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/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 = |