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

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Feb 9 16:03:23 PST 2024


MaskRay wrote:

> Why not condition this on `-no-pic`, and keep the previous more-optimal layout for the normal case?

The motivation is to avoid layout differences between `-no-pie` and `-pie/-shared`. If someone uses a linker script fragment with `INSERT`, it would be difficult if there are two layouts.

My original objection to doing anything for the `-no-pie` issue (#78521) was because I did not want to pessimize `-pie` users.

I think having two layouts is still an opinion, and I am eager to hear more opinions.

We could also have an option to select between the two layouts and figure out which default it should use. I don't know whether it justifies an option.

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


More information about the llvm-branch-commits mailing list