diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c
index 3e3dca81921..36b98bbd8fc 100644
--- a/gas/config/tc-microblaze.c
+++ b/gas/config/tc-microblaze.c
@@ -2145,6 +2145,29 @@ md_apply_fix (fixS *   fixP,
 	    }
 	}
       break;
+    case BFD_RELOC_8:
+      /* Don't do anything if the symbol is not defined.  */
+      if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy))
+	buf[0] |= (val & 0xff);
+      break;
+
+    case BFD_RELOC_16:
+      /* Don't do anything if the symbol is not defined.  */
+      if (fixP->fx_addsy == NULL || S_IS_DEFINED (fixP->fx_addsy))
+	{
+	  if (target_big_endian)
+	    {
+	      buf[0] |= ((val >> 8) & 0xff);
+	      buf[1] |= (val & 0xff);
+	    }
+	  else
+	    {
+	      buf[1] |= ((val >> 8) & 0xff);
+	      buf[0] |= (val & 0xff);
+	    }
+	}
+      break;
+
     case BFD_RELOC_32:
     case BFD_RELOC_RVA:
     case BFD_RELOC_32_PCREL:
diff --git a/gas/testsuite/gas/all/forward.d b/gas/testsuite/gas/all/forward.d
index d921ec517be..360ab778ebb 100644
--- a/gas/testsuite/gas/all/forward.d
+++ b/gas/testsuite/gas/all/forward.d
@@ -11,7 +11,7 @@
 # mep and microblaze use complex relocs and don't resolve the relocs.
 # one of the relocs references minus_one, which is a bug, but no one
 # seems bothered enough to fix this.
-#xfail: mep-*-* microblaze-*-*
+#xfail: mep-*-*
 
 .*: .*
 
