[lld] [LLD][ELF] Allow merging XO and RX sections, and add `--[no-]xosegment` flag (PR #132412)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 22 23:56:11 PDT 2025


=?utf-8?q?Csanád_Hajdú?= <csanad.hajdu at arm.com>,
=?utf-8?q?Csanád_Hajdú?= <csanad.hajdu at arm.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/132412 at github.com>


================
@@ -29,9 +29,13 @@ ELF Improvements
   GNU GCS Attribute Flags in Dynamic Objects when GCS is enabled. Inherits value
   from ``-zgcs-report`` (capped at ``warning`` level) unless user-defined,
   ensuring compatibility with GNU ld linker.
+* Added ``--xosegment`` and ``--no-xosegment`` flags to control whether to place
+  XO and RX sections in the same segment. The default value is ``--no-xosegment``.
 
 Breaking changes
 ----------------
+* XO and RX sections are now allowed to be placed in the same segment by default.
----------------
MaskRay wrote:

In user-facing release notes, perhaps makes this clearer: executable-only and readable-executable

https://github.com/llvm/llvm-project/pull/132412


More information about the llvm-commits mailing list