In D152973(https://reviews.llvm.org/D152973) we are making a small change to the named section in ELF files for FatLTO.
In review, it was decided to move the LTO related usage of the .llvmbc
ELF section to .llvm.lto
. The main rationale for this change was that the bitcode historically generated in these sections from -fembed-bitcode
was not all that suitable for LTO, as it had not gone through the appropriate pre-link pipelines. This was discussed (briefly) in the original RFC for adding -ffat-lto-objects
([RFC] -ffat-lto-objects support).
Note that, for now -fembed-bitcode
will still function exactly the same and generate a .llvmbc
section. The major difference is that APIs like isSectionBitcode
will no longer accept that section name. Where possible, we’re migrating to more portable features, such as section flags, but that is not always possible/applicable.
This does not impact Mach-O (LLVM,__bitcode) or COFF(.llvmbc) usage, right now. However, there may be similar changes in the future if we extend FatLTO support to other object file formats.
However, this is a change downstream projects should be aware of, so that they may adjust to the new section name accordingly.