[ELF] Ignore R_*_NONE relocs when relocating non-alloc sections

We shouldn't report an error for R_*_NONE relocs since we're emitting
them when writing relocations to discarded sections.

Differential Revision: https://reviews.llvm.org/D30279

llvm-svn: 295936
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp
index 08ef75d..a05ff79 100644
--- a/lld/ELF/Target.cpp
+++ b/lld/ELF/Target.cpp
@@ -389,7 +389,7 @@
   case R_386_TLS_LE_32:
     return R_NEG_TLS;
   case R_386_NONE:
-    return R_HINT;
+    return R_NONE;
   default:
     error(toString(S.File) + ": unknown relocation type: " + toString(Type));
     return R_HINT;
@@ -684,7 +684,7 @@
   case R_X86_64_GOTTPOFF:
     return R_GOT_PC;
   case R_X86_64_NONE:
-    return R_HINT;
+    return R_NONE;
   default:
     error(toString(S.File) + ": unknown relocation type: " + toString(Type));
     return R_HINT;
@@ -1715,7 +1715,7 @@
   case R_ARM_THM_MOVT_PREL:
     return R_PC;
   case R_ARM_NONE:
-    return R_HINT;
+    return R_NONE;
   case R_ARM_TLS_LE32:
     return R_TLS;
   }