[llvm-branch-commits] [ELF] Support placing .lbss/.lrodata/.ldata after .bss (PR #81224)
Fangrui Song via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Feb 15 14:35:05 PST 2024
================
@@ -1436,6 +1436,8 @@ static void readConfigs(opt::InputArgList &args) {
config->zInterpose = hasZOption(args, "interpose");
config->zKeepTextSectionPrefix = getZFlag(
args, "keep-text-section-prefix", "nokeep-text-section-prefix", false);
+ config->zLrodataAfterBss =
+ getZFlag(args, "lrodata-after-bss", "nolrodata-after-bss", false);
----------------
MaskRay wrote:
I have explained. The layout should not magically change if the user switches between -no-pie and -pie/-shared. There are a few options to change the layout (-z keep-text-section-prefix, -z separate-code, --no-rosegment, etc), but none does a "smart" choice.
With -z separate-code and a large max-page-size, one extra PT_LOAD can have a significant waste. I was actually struggling with the default but now I feel that the current layout makes more sense as the default.
https://github.com/llvm/llvm-project/pull/81224
More information about the llvm-branch-commits
mailing list