OSDN Git Service

[LLD][COFF] Skip computation of the undefined symbols references that are not shown
authorSylvain Audi <sylvain.audi@ubisoft.com>
Thu, 9 Jul 2020 21:12:02 +0000 (17:12 -0400)
committerSylvain Audi <sylvain.audi@ubisoft.com>
Mon, 20 Jul 2020 17:45:16 +0000 (13:45 -0400)
commit3a108ab256dba7b5a7304f0e83818673d334405f
treeb52ad31cdd30a39c4127a6de4c859baf00775d0a
parent877b2593c299b619c918cdf26e61b566c1501617
[LLD][COFF] Skip computation of the undefined symbols references that are not shown

The "undefined symbol" error message from lld-link displays up to 3 references to that symbol, and the number of extra references not shown.

This patch removes the computation of the strings for those extra references.

It fixes a freeze of lld-link we accidentally encountered when activating asan on a large project, without linking with the asan library.
In that case, __asan_report_load8 was referenced more than 2 million times, causing the computation of that many display strings, of which only 3 were used.

Differential Revision: https://reviews.llvm.org/D83510
lld/COFF/SymbolTable.cpp
lld/test/COFF/Inputs/undefined-symbol-multi-lto.ll [new file with mode: 0644]
lld/test/COFF/undefined-symbol-multi.s