From 3a35c4546d191f2d6d285c5fae3bc85552b590b8 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 22 Apr 2016 18:47:52 +0000 Subject: ELF: Scan for undefined symbols in shlibs and symbols in dynamic lists before LTO. This ensures that these features work correctly with bitcode files. llvm-svn: 267188 --- lld/ELF/Driver.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lld/ELF/Driver.cpp') diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index 7e6af5ede72..1b1f0beb40b 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -458,14 +458,15 @@ template void LinkerDriver::link(opt::InputArgList &Args) { if (Config->OutputFile.empty()) Config->OutputFile = "a.out"; + Symtab.scanShlibUndefined(); + Symtab.scanDynamicList(); + Symtab.addCombinedLtoObject(); for (auto *Arg : Args.filtered(OPT_wrap)) Symtab.wrap(Arg->getValue()); // Write the result to the file. - Symtab.scanShlibUndefined(); - Symtab.scanDynamicList(); if (Config->GcSections) markLive(&Symtab); if (Config->ICF) -- cgit v1.2.3