[llvm-branch-commits] [ELF] Support placing .lbss/.lrodata/.ldata after .bss (PR #81224)

Arthur Eubanks via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Feb 20 13:32:01 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);
----------------
aeubanks wrote:

Reiterating what was discussed privately: I don't think `-fpie -no-pie`/`-fpic -no-pie` are really in use, that doesn't really make sense. So for anybody using `-no-pie`, they are almost certainly using `-fno-pic`, which either `-z lrodata-after-bss` doesn't affect if there is no large data, or is necessary to prevent relocation overflows. So `-z lrodata-after-bss` really should default to the value of `-no-pie`.

And again, the placement of large data shouldn't matter, as long as it doesn't affect 32-bit relocation pressure.

But if you won't change your mind, then this PR looks good in its current state.

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


More information about the llvm-branch-commits mailing list