lld-8.0-u3.patch (921B)
1 diff --git a/lld/COFF/Writer.cpp b/lld/COFF/Writer.cpp 2 index 56b797451cf..129d64be78d 100644 3 --- a/COFF/Writer.cpp 4 +++ b/COFF/Writer.cpp 5 @@ -761,7 +761,7 @@ void Writer::createSections() { 6 StringRef Name = getOutputSectionName(Pair.first.first); 7 uint32_t OutChars = Pair.first.second; 8 9 - if (Name == ".CRT") { 10 + if (Name == ".CRT" || Name == ".rsrc") { 11 // In link.exe, there is a special case for the I386 target where .CRT 12 // sections are treated as if they have output characteristics DATA | R if 13 // their characteristics are DATA | R | W. This implements the same 14 @@ -1320,8 +1320,6 @@ void Writer::createSEHTable() { 15 for (ObjFile *File : ObjFile::Instances) { 16 // FIXME: We should error here instead of earlier unless /safeseh:no was 17 // passed. 18 - if (!File->hasSafeSEH()) 19 - return; 20 21 markSymbolsForRVATable(File, File->getSXDataChunks(), Handlers); 22 }