diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2015-11-06 13:35:35 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2015-11-06 13:35:35 +0000 |
commit | b20b70687a8defb529053da579df95f881e3b078 (patch) | |
tree | 573085065237975ce8054d35a2d58bc741ca6917 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | 97588e15648dc54bfe6bf242da39781947c20a47 (diff) | |
download | bcm5719-llvm-b20b70687a8defb529053da579df95f881e3b078.tar.gz bcm5719-llvm-b20b70687a8defb529053da579df95f881e3b078.zip |
Use SHT_X86_64_UNWIND on every OS.
That is the ABI required type. Linkers still check the section name, so
everything should still work.
llvm-svn: 252300
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 4c51c8363f3..8849f5d4d12 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/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, |