git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150819
91177308-0d34-0410-b5e6-
96231b3b80d8
unsigned FDEEncoding;
unsigned FDECFIEncoding;
unsigned TTypeEncoding;
+ // Section flags for eh_frame
+ unsigned EHSectionFlags;
/// TextSection - Section directive for standard text.
///
}
}
+ // 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,
else if (Env == IsELF)
EHFrameSection =
Ctx->getELFSection(".eh_frame", ELF::SHT_PROGBITS,
- ELF::SHF_ALLOC,
+ EHSectionFlags,
SectionKind::getDataRel());
else
EHFrameSection =