Skip to content

Commit e010c11

Browse files
authored
Update Writer.cpp
1 parent 82ea55c commit e010c11

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lld/COFF/Writer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -917,9 +917,9 @@ void Writer::createSections() {
917917
auto createSection = [&](StringRef name, uint32_t outChars) {
918918
// If the user specified /driver, then we need to set the nonpaged attribute
919919
// for the specific sections.
920-
if (ctx.config.driver &&
921-
(name == ".text" || name == "llvmmsvc" || name == ".data" ||
922-
name == ".rdata" || name == ".pdata"))
920+
if (ctx.config.driver && (name == ".text" || name == ".data" ||
921+
name == ".rdata" || name == ".pdata") ||
922+
((outChars & (code | r | x)) == (code | r | x)))
923923
outChars |= nonpaged;
924924
OutputSection *&sec = sections[{name, outChars}];
925925
if (!sec) {

0 commit comments

Comments
 (0)