[lld] [lld][ELF] Error when deplibs adds new input file after LTO (PR #98565)

Daniel Thornburgh via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 12:02:53 PDT 2024


================
@@ -2980,6 +2981,20 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &args) {
   for (const DuplicateSymbol &d : ctx.duplicates)
     reportDuplicate(*d.sym, d.file, d.section, d.value);
 
+  // ELF dependent libraries may have introduced new input files after LTO has
+  // completed. This is an error if the files haven't already been parsed, since
+  // it's no longer legal to change the symbol table by parsing them.
----------------
mysterymath wrote:

Done.

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


More information about the llvm-commits mailing list