diff options
| author | Fangrui Song <i@maskray.me> | 2021-12-24 19:01:50 -0800 |
|---|---|---|
| committer | Fangrui Song <i@maskray.me> | 2021-12-24 19:01:51 -0800 |
| commit | 40fae4d8fcbd6224f16fdf3ba84a0d89b713e7d5 (patch) | |
| tree | e15e3cdb8c68e4719ba469097b78763dfe1e6dd1 /lld/ELF/InputFiles.cpp | |
| parent | 745420d3f4b050282e65cdf7893050fc90bf9c8a (diff) | |
[ELF] Optimize replaceCommonSymbols
This decreases the 0.2% time (no debug info) to nearly no.
Diffstat (limited to 'lld/ELF/InputFiles.cpp')
| -rw-r--r-- | lld/ELF/InputFiles.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index 0badf2c55e5b..e321b0d82920 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -1123,6 +1123,7 @@ template <class ELFT> void ObjFile<ELFT>::initializeSymbols() { if (value == 0 || value >= UINT32_MAX) fatal(toString(this) + ": common symbol '" + name + "' has invalid alignment: " + Twine(value)); + hasCommonSyms = true; sym->resolve( CommonSymbol{this, name, binding, stOther, type, value, size}); continue; |
