[lld] r298748 - Update comment.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 24 16:21:14 PDT 2017
Author: ruiu
Date: Fri Mar 24 18:21:14 2017
New Revision: 298748
URL: http://llvm.org/viewvc/llvm-project?rev=298748&view=rev
Log:
Update comment.
Modified:
lld/trunk/ELF/Relocations.cpp
Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=298748&r1=298747&r2=298748&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Fri Mar 24 18:21:14 2017
@@ -686,8 +686,10 @@ static void scanRelocs(InputSectionBase
I += Processed;
}
- // We only report undefined symbols if they are referenced somewhere in the
- // code.
+ // Report undefined symbols. The fact that we report undefined
+ // symbols here means that we report undefined symbols only when
+ // they have relocations pointing to them. We don't care about
+ // undefined symbols that are in dead-stripped sections.
if (!Body.isLocal() && Body.isUndefined() && !Body.symbol()->isWeak())
reportUndefined<ELFT>(Body, C, RI.r_offset);
More information about the llvm-commits
mailing list