[lld] [lld/ELF] Place large executable sections at the beginning (PR #70358)

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 15:17:12 PST 2024


rnk wrote:

> I wish that we have complete analysis that this is necessary and -mcmodel=medium isn't sufficient before proceeding with the linker change.

I think our analysis of msan track origins shows that it has a 3x .text size multiplier, and many reasonable applications have ~0.67GiB of .text. Even with `-mlarge-data-treshold=0` and zero relocation pressure from any data sections, this configuration will require the large code model. Is that sufficient analysis?

Landing this `.ltext` placement logic will effectively make code compiled in the large code model ABI compatible with small code, and I think we should do it. 

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


More information about the llvm-commits mailing list