llvm.org GIT mirror llvm / bce0de4
Use the correct section types on Solaris for unwind data on both x86 and x86-64. Patch by Dmitri Shubin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154391 91177308-0d34-0410-b5e6-96231b3b80d8 David Chisnall 8 years ago
2 changed file(s) with 9 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
4646 unsigned FDECFIEncoding;
4747 unsigned TTypeEncoding;
4848 // Section flags for eh_frame
49 unsigned EHSectionType;
4950 unsigned EHSectionFlags;
5051
5152 /// TextSection - Section directive for standard text.
259259
260260 // Solaris requires different flags for .eh_frame to seemingly every other
261261 // platform.
262 EHSectionType = ELF::SHT_PROGBITS;
262263 EHSectionFlags = ELF::SHF_ALLOC;
263 if (T.getOS() == Triple::Solaris)
264 EHSectionFlags |= ELF::SHF_WRITE;
264 if (T.getOS() == Triple::Solaris) {
265 if (T.getArch() == Triple::x86_64)
266 EHSectionType = ELF::SHT_X86_64_UNWIND;
267 else
268 EHSectionFlags |= ELF::SHF_WRITE;
269 }
265270
266271
267272 // ELF
574579 SectionKind::getReadOnly());
575580 else if (Env == IsELF)
576581 EHFrameSection =
577 Ctx->getELFSection(".eh_frame", ELF::SHT_PROGBITS,
582 Ctx->getELFSection(".eh_frame", EHSectionType,
578583 EHSectionFlags,
579584 SectionKind::getDataRel());
580585 else