File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -932,11 +932,14 @@ void Writer::createSections() {
932
932
auto createSection = [&](StringRef name, uint32_t outChars) {
933
933
// If the user specified /driver, then we need to set the nonpaged attribute
934
934
// for the specific sections.
935
- if (ctx.config .driver && (name == " .text" || name == " .data" ||
936
- name == " .rdata" || name == " .pdata" ) ||
937
- ((outChars & (code | r | x)) == (code | r | x)) && name != " PAGE" &&
938
- name != " INIT" )
939
- outChars |= nonpaged;
935
+ if (ctx.config .driver ) {
936
+ if (name == " .text" || name == " .data" || name == " .rdata" ||
937
+ name == " .pdata" )
938
+ outChars |= nonpaged;
939
+ else if ((outChars & (code | r | x)) == (code | r | x) &&
940
+ name != " PAGE" && name != " INIT" )
941
+ outChars |= nonpaged;
942
+ }
940
943
OutputSection *&sec = sections[{name, outChars}];
941
944
if (!sec) {
942
945
sec = make<OutputSection>(name, outChars);
You can’t perform that action at this time.
0 commit comments