Go back to producing relocations for out of range symbols.
[oota-llvm.git] / lib / Target / ARM / MCTargetDesc / ARMAsmBackend.cpp
index fd678fb132ee1b5fbdd96104964d60c79471fe4c..7a0a089b35f561999684aee48d72cea5d0a3aa76 100644 (file)
@@ -639,13 +639,11 @@ void ARMAsmBackend::processFixupValue(const MCAssembler &Asm,
 
     // If the symbol is external the linker will handle it.
     // FIXME: Should we handle it as an optimization?
-    if (Sym->isExternal()) {
+
+    // If the symbol is out of range, produce a relocation and hope the
+    // linker can handle it. GNU AS produces an error in this case.
+    if (Sym->isExternal() || Value >= 0x400004)
       IsResolved = false;
-    } else {
-      if (Value >= 0x400004)
-        Asm.getContext().reportFatalError(Fixup.getLoc(),
-                                          "out of range for branch");
-    }
   }
   // We must always generate a relocation for BL/BLX instructions if we have
   // a symbol to reference, as the linker relies on knowing the destination