Don't create relocations for absolute got entries.

llvm-svn: 266427
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index bead468..c942b5d 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -588,16 +588,12 @@
         // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
         continue;
 
-      if (Preemptible || Config->Pic) {
+      if (Preemptible || (Config->Pic && !isAbsolute<ELFT>(Body))) {
         uint32_t DynType;
         if (Body.isTls())
           DynType = Target->TlsGotRel;
         else if (Preemptible)
           DynType = Target->GotRel;
-        else if (Body.isUndefined())
-          // Weak undefined symbols evaluate to zero, so don't create
-          // relocations for them.
-          continue;
         else
           DynType = Target->RelativeRel;
         AddDyn({DynType, Out<ELFT>::Got, Body.getGotOffset<ELFT>(),