[llvm-branch-commits] [lld] Discard SHT_LLVM_LTO sections in relocatable links (PR #92825)

Fangrui Song via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon May 20 22:15:19 PDT 2024


================
@@ -832,6 +832,15 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
       this->sections[i] =
           createInputSection(i, sec, check(obj.getSectionName(sec, shstrtab)));
       break;
+    case SHT_LLVM_LTO:
+      // When doing a relocatable link with FatLTO objects, if we're not using
----------------
MaskRay wrote:

// Discard .llvm.lto in a relocatable link that does not use the bitcode. The concatenated output does not reflect the semantics. In addition, since we do not use the bitcode wrapper format, the concatenated raw bitcode would be invalid.

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


More information about the llvm-branch-commits mailing list