forked from OSchip/llvm-project
Move fetchIfLazy up so that the following comment makes sense.
We have this comment in LinkerDriver::link After this, no new names except a few linker-synthesized ones will be added to the symbol table. but that was not true because new symbols could be added by processing the -u option. llvm-svn: 314842
This commit is contained in:
parent
fa105f8deb
commit
a215e7cbe8
|
|
@ -1031,6 +1031,10 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
|
|||
for (StringRef Sym : Script->Opt.ReferencedSymbols)
|
||||
Symtab->addUndefined<ELFT>(Sym);
|
||||
|
||||
// Handle the `--undefined <sym>` options.
|
||||
for (StringRef S : Config->Undefined)
|
||||
Symtab->fetchIfLazy<ELFT>(S);
|
||||
|
||||
// If an entry symbol is in a static archive, pull out that file now
|
||||
// to complete the symbol table. After this, no new names except a
|
||||
// few linker-synthesized ones will be added to the symbol table.
|
||||
|
|
@ -1040,10 +1044,6 @@ template <class ELFT> void LinkerDriver::link(opt::InputArgList &Args) {
|
|||
if (ErrorCount)
|
||||
return;
|
||||
|
||||
// Handle the `--undefined <sym>` options.
|
||||
for (StringRef S : Config->Undefined)
|
||||
Symtab->fetchIfLazy<ELFT>(S);
|
||||
|
||||
// Handle undefined symbols in DSOs.
|
||||
Symtab->scanShlibUndefined<ELFT>();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue