[lld] r286955 - [ELF] Don't check Out<ELFT>::RelaPlt as it's always non-zero. NFC
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 15 10:56:22 PST 2016
Nice!
On Tue, Nov 15, 2016 at 5:19 AM, Eugene Leviant via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> 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
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161115/71904a49/attachment.html>
More information about the llvm-commits
mailing list