[lld] [lld][ELF] Coalesce uniqued .sbss and .sdata sections (PR #104485)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 15 14:06:46 PDT 2024


MaskRay wrote:

"Coalesce" appears preferred for Mach-O. In ELF, "combine" (see the generic ABI "Rules for Linking Unrecognized Sections").

GCC seems to use .srodata, .sdata, .sbss, but not `.sdata.rel.ro`. GNU ld somehow places .srodata into .sdata, ignoring the different flags. If we support .srodata.xx, perhaps place it into .srodata. If a user wants to place .srodata into .sdata, use `SECTIONS` or `OVERWRITE_SECTIONS`.

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


More information about the llvm-commits mailing list