[lld] r286955 - [ELF] Don't check Out<ELFT>::RelaPlt as it's always non-zero. NFC
Eugene Leviant via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 05:19:22 PST 2016
Author: evgeny777
Date: Tue Nov 15 07:19:21 2016
New Revision: 286955
URL: http://llvm.org/viewvc/llvm-project?rev=286955&view=rev
Log:
[ELF] Don't check Out<ELFT>::RelaPlt as it's always non-zero. NFC
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=286955&r1=286954&r2=286955&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Nov 15 07:19:21 2016
@@ -586,7 +586,7 @@ static Symbol *addOptionalRegular(String
// need these symbols, since IRELATIVE relocs are resolved through GOT
// and PLT. For details, see http://www.airs.com/blog/archives/403.
template <class ELFT> void Writer<ELFT>::addRelIpltSymbols() {
- if (Out<ELFT>::DynSymTab || !Out<ELFT>::RelaPlt)
+ if (Out<ELFT>::DynSymTab)
return;
StringRef S = Config->Rela ? "__rela_iplt_start" : "__rel_iplt_start";
addOptionalSynthetic<ELFT>(S, Out<ELFT>::RelaPlt, 0);
@@ -1004,7 +1004,7 @@ template <class ELFT> void Writer<ELFT>:
// We always need to add rel[a].plt to output if it has entries.
// Even during static linking it can contain R_[*]_IRELATIVE relocations.
- if (Out<ELFT>::RelaPlt && Out<ELFT>::RelaPlt->hasRelocs())
+ if (Out<ELFT>::RelaPlt->hasRelocs())
Add(Out<ELFT>::RelaPlt);
// We fill .got and .got.plt sections in scanRelocs(). This is the
More information about the llvm-commits
mailing list