diff options
| author | Peter Collingbourne <peter@pcc.me.uk> | 2016-04-22 18:47:52 +0000 |
|---|---|---|
| committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-04-22 18:47:52 +0000 |
| commit | 3a35c4546d191f2d6d285c5fae3bc85552b590b8 (patch) | |
| tree | fe19b4b6f43d5cd6daa48b19ae2900c6a7299295 /lld/ELF/Driver.cpp | |
| parent | 1a4bc110f52100fad5b5909cf76c234604c18306 (diff) | |
| download | bcm5719-llvm-3a35c4546d191f2d6d285c5fae3bc85552b590b8.tar.gz bcm5719-llvm-3a35c4546d191f2d6d285c5fae3bc85552b590b8.zip | |
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
Diffstat (limited to 'lld/ELF/Driver.cpp')
| -rw-r--r-- | lld/ELF/Driver.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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 <class ELFT> 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<ELFT>(&Symtab); if (Config->ICF) |

