[llvm] Put large common blocks into .lbss for the medium and large code models (PR #161483)

via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 3 00:41:39 PDT 2025


ssijaric-nv wrote:

Thank you, @MaskRay, for having a look at this.  This is an attempt to address https://github.com/llvm/llvm-project/issues/149222 to match the gfortran behavior.  

The increase in size of MCSymbolELF is concerning.   I didn't want to introduce a new kind for this corner case, (e.g. LargeCommon) to the 'enum Kind' in MCSymbol.h, even though there is space in the 'kind' bitfield to hold an additional kind.  I'll look for a different way to represent large common symbols without increasing the MCSymbolELF size.  Will rename SHN_AMD64_LCOMMON to SHN_X86_64_LCOMMON. 

For the lld change, I'll  remove LbssSection.  Thanks.  I tested the linker change with the Fortran tests that are included in the llvm-test-suite.  I'll see if I can get reliable link times with and without the change with the llvm-test-suite Fortran tests, or a larger application.



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


More information about the llvm-commits mailing list