summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2016-04-22 18:47:52 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2016-04-22 18:47:52 +0000
commit3a35c4546d191f2d6d285c5fae3bc85552b590b8 (patch)
treefe19b4b6f43d5cd6daa48b19ae2900c6a7299295 /lld/ELF/Driver.cpp
parent1a4bc110f52100fad5b5909cf76c234604c18306 (diff)
downloadbcm5719-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.cpp5
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)
OpenPOWER on IntegriCloud