[lld] [lld][ELF] Error when deplibs adds new input file after LTO (PR #98565)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 22:23:20 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.
----------------
MaskRay wrote:
"no longer legal ..." => changing the symbol table could break the semantic assumption of LTO.
https://github.com/llvm/llvm-project/pull/98565
More information about the llvm-commits
mailing list