diff options
| author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-04-26 17:58:58 +0000 |
|---|---|---|
| committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-04-26 17:58:58 +0000 |
| commit | ab0cce5f1f0aac2699b9efb4c6d8021497439e9d (patch) | |
| tree | 35d07030db7ba38409bec214ff467303df057563 /lld/ELF/LinkerScript.cpp | |
| parent | b09308d82abecaa8505728ceffa28b36c57eb761 (diff) | |
| download | bcm5719-llvm-ab0cce5f1f0aac2699b9efb4c6d8021497439e9d.tar.gz bcm5719-llvm-ab0cce5f1f0aac2699b9efb4c6d8021497439e9d.zip | |
Replace SharedSymbols with Defined when creating copy relocations.
This is slightly simpler to read IMHO. Now if a symbol has a position
in the file, it is Defined.
The main motivation is that with this a SharedSymbol doesn't need a
section, which reduces the size of SymbolUnion.
With this the peak allocation when linking chromium goes from 568.1 to
564.2 MB.
llvm-svn: 330966
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index d99d38272df..1c71c528830 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -1111,8 +1111,8 @@ ExprValue LinkerScript::getSymbolValue(StringRef Name, const Twine &Loc) { if (auto *DS = dyn_cast<Defined>(Sym)) return {DS->Section, false, DS->Value, Loc}; if (auto *SS = dyn_cast<SharedSymbol>(Sym)) - if (!ErrorOnMissingSection || SS->CopyRelSec) - return {SS->CopyRelSec, false, 0, Loc}; + if (!ErrorOnMissingSection) + return {nullptr, false, 0, Loc}; } error(Loc + ": symbol not found: " + Name); |

