bfd/
[deliverable/binutils-gdb.git] / gas / config / tc-ppc.c
index 7aebda8e583f838e3825270ab139382393653997..5c413d3dab98acffc6aa545b3353d76318a1812a 100644 (file)
@@ -6417,9 +6417,9 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
       char *where;
       unsigned long insn;
 
-#ifdef OBJ_ELF
       switch (fixP->fx_r_type)
        {
+#ifdef OBJ_ELF
          /* The following relocs can't be calculated by the assembler.
             Leave the field zero.  */
        case BFD_RELOC_PPC_TPREL16:
@@ -6528,11 +6528,18 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
        case BFD_RELOC_PPC_TLSLD:
          fieldval = 0;
          break;
+#endif
+
+#ifdef OBJ_XCOFF
+       case BFD_RELOC_PPC_B16:
+         /* Adjust the offset to the instruction boundary.  */
+         fieldval += 2;
+         break;
+#endif
 
        default:
          break;
        }
-#endif
 
 #ifdef OBJ_ELF
 /* powerpc uses RELA style relocs, so if emitting a reloc the field
This page took 0.024458 seconds and 4 git commands to generate.