summaryrefslogtreecommitdiffstats
path: root/lld/COFF/SymbolTable.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2019-11-13 09:40:30 +0200
committerMartin Storsjö <martin@martin.st>2019-11-13 22:48:36 +0200
commit38bc9559bacf095f4ef5a3845b6033e9d70e588e (patch)
tree71458603e7bee8edbab142daf8eac068d5d481ca /lld/COFF/SymbolTable.cpp
parent597b77fb7ff9419c502a0bfa582688d1e70d0309 (diff)
downloadbcm5719-llvm-38bc9559bacf095f4ef5a3845b6033e9d70e588e.tar.gz
bcm5719-llvm-38bc9559bacf095f4ef5a3845b6033e9d70e588e.zip
[LLD] [COFF] Fix automatically importing data symbols from DLLs with LTO
This broke in 51dcb292cc002, "[lld-link] diagnose undefined symbols before LTO when possible" (very soon after the 9.0 branch, so luckily the 9.0 release is unaffected). The code for loading objects we believe might be needed for autoimport (loadMinGWAutomaticImports()) does run before the new reportUnresolvable() function, but it had a condition to only operate on symbols from regular object files. This condition came from resolveRemainingUndefines(), but as loadMinGWAutomaticImports() now has to operate before the LTO, it has to operate on undefineds from LTO objects as well. Differential Revision: https://reviews.llvm.org/D70166
Diffstat (limited to 'lld/COFF/SymbolTable.cpp')
-rw-r--r--lld/COFF/SymbolTable.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/lld/COFF/SymbolTable.cpp b/lld/COFF/SymbolTable.cpp
index 869dfc7a2ee..b582d225df7 100644
--- a/lld/COFF/SymbolTable.cpp
+++ b/lld/COFF/SymbolTable.cpp
@@ -227,8 +227,6 @@ void SymbolTable::loadMinGWAutomaticImports() {
auto *undef = dyn_cast<Undefined>(sym);
if (!undef)
continue;
- if (!sym->isUsedInRegularObj)
- continue;
if (undef->getWeakAlias())
continue;
OpenPOWER on IntegriCloud