[lld] [ELF] --no-rosegment: don't mark read-only PT_LOAD segments executable (PR #81223)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 09:10:16 PST 2024
================
@@ -2465,13 +2460,22 @@ SmallVector<PhdrEntry *, 0> Writer<ELFT>::createPhdrs(Partition &part) {
// so when hasSectionsCommand, since we cannot introduce the extra alignment
// needed to create a new LOAD)
uint64_t newFlags = computeFlags(sec->getPhdrFlags());
+ // When --no-rosegment is specified, RO and RX sections are compatible.
+ uint32_t diff = flags ^ newFlags;
----------------
MaskRay wrote:
Renamed
https://github.com/llvm/llvm-project/pull/81223
More information about the llvm-commits
mailing list