Write the addent to got entries when using Elf_Rel.

llvm-svn: 288451
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index d3bef68..d146b22 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -760,9 +760,11 @@
       else
         DynType = Target->GotRel;
 
-      if (Preemptible || (Config->Pic && !isAbsolute<ELFT>(Body)))
+      // FIXME: this logic is almost duplicated above.
+      bool Constant = !Preemptible && !(Config->Pic && !isAbsolute<ELFT>(Body));
+      if (!Constant)
         AddDyn({DynType, In<ELFT>::Got, Off, !Preemptible, &Body, 0});
-      else
+      if (Constant || !RelTy::IsRela)
         In<ELFT>::Got->Relocations.push_back({GotRE, DynType, Off, 0, &Body});
       continue;
     }