Start adding target abstractions.

This is just enough to get PLT working on 32 bit x86.

The idea behind using a virtual interface is that it should be easy to
convert any of the functions to template parameters if any turns out to be
performance critical.

llvm-svn: 248308
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 9ba202d..b467ef3 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -11,6 +11,7 @@
 #include "Config.h"
 #include "OutputSections.h"
 #include "SymbolTable.h"
+#include "Target.h"
 
 #include "llvm/Support/FileOutputBuffer.h"
 
@@ -256,12 +257,12 @@
     if (!S)
       continue;
     uint32_t Type = RI.getType(IsMips64EL);
-    if (relocNeedsPLT(Type)) {
+    if (Target->relocNeedsPlt(Type)) {
       if (Body->isInPlt())
         continue;
       PltSec.addEntry(Body);
     }
-    if (relocNeedsGOT(Type)) {
+    if (Target->relocNeedsGot(Type)) {
       if (Body->isInGot())
         continue;
       GotSec.addEntry(Body);