[lld] r263388 - [ELF][MIPS] Use TargetInfo::needsGot call to check necessity of GOT for local symbols. NFC.

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 13 13:13:24 PDT 2016


Author: atanasyan
Date: Sun Mar 13 15:13:24 2016
New Revision: 263388

URL: http://llvm.org/viewvc/llvm-project?rev=263388&view=rev
Log:
[ELF][MIPS] Use TargetInfo::needsGot call to check necessity of GOT for local symbols. 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=263388&r1=263387&r2=263388&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Sun Mar 13 15:13:24 2016
@@ -339,7 +339,7 @@ void Writer<ELFT>::scanRelocs(InputSecti
 
     // MIPS has a special rule to create GOTs for local symbols.
     if (Config->EMachine == EM_MIPS && !Preemptible &&
-        (Type == R_MIPS_GOT16 || Type == R_MIPS_CALL16)) {
+        Target->needsGot(Type, Body)) {
       // FIXME (simon): Do not add so many redundant entries.
       Out<ELFT>::Got->addMipsLocalEntry();
       continue;




More information about the llvm-commits mailing list