X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FMC%2FMCObjectFileInfo.cpp;h=8849f5d4d122776bfce1aef8ab72a4bbe80aab8c;hb=20db4731726eded30dd7bcd6702a7e7498bf7b29;hp=4c51c8363f3ec49a286d90bcca181c94c62383fa;hpb=ee3332fb71e14df81ba99dbbfaeb619d6589547b;p=oota-llvm.git diff --git a/lib/MC/MCObjectFileInfo.cpp b/lib/MC/MCObjectFileInfo.cpp index 4c51c8363f3..8849f5d4d12 100644 --- a/lib/MC/MCObjectFileInfo.cpp +++ b/lib/MC/MCObjectFileInfo.cpp @@ -416,16 +416,14 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(Triple T) { break; } + EHSectionType = T.getArch() == Triple::x86_64 ? ELF::SHT_X86_64_UNWIND + : ELF::SHT_PROGBITS; + // Solaris requires different flags for .eh_frame to seemingly every other // platform. - EHSectionType = ELF::SHT_PROGBITS; EHSectionFlags = ELF::SHF_ALLOC; - if (T.isOSSolaris()) { - if (T.getArch() == Triple::x86_64) - EHSectionType = ELF::SHT_X86_64_UNWIND; - else - EHSectionFlags |= ELF::SHF_WRITE; - } + if (T.isOSSolaris() && T.getArch() != Triple::x86_64) + EHSectionFlags |= ELF::SHF_WRITE; // ELF BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,