Skip to content

Commit 5f26b90

Browse files
committed
[ELF] Apply forgotten change to #81223
1 parent bb18085 commit 5f26b90

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lld/ELF/Writer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2446,8 +2446,8 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(Partition &part) {
24462446
// Segments are contiguous memory regions that has the same attributes
24472447
// (e.g. executable or writable). There is one phdr for each segment.
24482448
// Therefore, we need to create a new phdr when the next section has
2449-
// compatible flags or is loaded at a discontiguous address or memory region
2450-
// using AT or AT> linker script command, respectively.
2449+
// incompatible flags or is loaded at a discontiguous address or memory
2450+
// region using AT or AT> linker script command, respectively.
24512451
//
24522452
// As an exception, we don't create a separate load segment for the ELF
24532453
// headers, even if the first "real" output has an AT or AT> attribute.
@@ -2461,10 +2461,10 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(Partition &part) {
24612461
// needed to create a new LOAD)
24622462
uint64_t newFlags = computeFlags(sec->getPhdrFlags());
24632463
// When --no-rosegment is specified, RO and RX sections are compatible.
2464-
uint32_t diff = flags ^ newFlags;
2464+
uint32_t incompatible = flags ^ newFlags;
24652465
if (config->singleRoRx && !(newFlags & PF_W))
2466-
diff &= ~PF_X;
2467-
if (diff)
2466+
incompatible &= ~PF_X;
2467+
if (incompatible)
24682468
load = nullptr;
24692469

24702470
bool sameLMARegion =

0 commit comments

Comments
 (0)