mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
[COFF] Don't mark mingw .eh_frame sections writable
This improves compatibility with GCC produced object files, where the .eh_frame sections are read only. With mixed flags for the involved .eh_frame sections, LLD creates two separate .eh_frame sections in the output binary, one for each flag combination, while ld.bfd probably merges them. The previous setup of flags can be traced back to SVN r79346. Differential Revision: https://reviews.llvm.org/D55209 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348177 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -479,10 +479,10 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(const Triple &T, bool Large) {
|
||||
}
|
||||
|
||||
void MCObjectFileInfo::initCOFFMCObjectFileInfo(const Triple &T) {
|
||||
EHFrameSection = Ctx->getCOFFSection(
|
||||
".eh_frame", COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
|
||||
COFF::IMAGE_SCN_MEM_READ | COFF::IMAGE_SCN_MEM_WRITE,
|
||||
SectionKind::getData());
|
||||
EHFrameSection =
|
||||
Ctx->getCOFFSection(".eh_frame", COFF::IMAGE_SCN_CNT_INITIALIZED_DATA |
|
||||
COFF::IMAGE_SCN_MEM_READ,
|
||||
SectionKind::getData());
|
||||
|
||||
// Set the `IMAGE_SCN_MEM_16BIT` flag when compiling for thumb mode. This is
|
||||
// used to indicate to the linker that the text segment contains thumb instructions
|
||||
|
||||
Reference in New Issue
Block a user