diff options
author | Martin Storsjo <martin@martin.st> | 2018-12-03 20:02:05 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2018-12-03 20:02:05 +0000 |
commit | 1aa7e900b331b3709f22ee1163958f49e723c311 (patch) | |
tree | fba67b00280ae11fa183f810653dd37bb993e5b1 /llvm/lib/MC/MCObjectFileInfo.cpp | |
parent | aa2711f1f8b2c92c99af4359ac3dd98af6a48f37 (diff) | |
download | llvm-1aa7e900b331b3709f22ee1163958f49e723c311.zip llvm-1aa7e900b331b3709f22ee1163958f49e723c311.tar.gz llvm-1aa7e900b331b3709f22ee1163958f49e723c311.tar.bz2 |
[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
llvm-svn: 348177
Diffstat (limited to 'llvm/lib/MC/MCObjectFileInfo.cpp')
-rw-r--r-- | llvm/lib/MC/MCObjectFileInfo.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/MC/MCObjectFileInfo.cpp b/llvm/lib/MC/MCObjectFileInfo.cpp index 0513ba5..c73a9eb 100644 --- a/llvm/lib/MC/MCObjectFileInfo.cpp +++ b/llvm/lib/MC/MCObjectFileInfo.cpp @@ -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 |