llvm-project
608fb463 - [lld] Discard SHT_LLVM_LTO sections in relocatable links (#92825)

Commit
1 year ago
[lld] Discard SHT_LLVM_LTO sections in relocatable links (#92825) So long as ld -r links using bitcode always result in an ELF object, and not a merged bitcode object, the output form a relocatable link using FatLTO objects should not have a .llvm.lto section. Prior to this, using the object code sections would cause the bitcode section in the output of a relocatable link to be corrupted, by concatenating all the .llvm.lto sections together. This patch discards SHT_LLVM_LTO sections when not using --fat-lto-objects, so that the relocatable ELF output won't contain inalid bitcode.
Author
Parents
Loading