Browse Source

PPC: Fix externally provided relocation offsets in DynASM.

Mike Pall 14 years ago
parent
commit
9df9c7ef73
1 changed files with 1 additions and 1 deletions
  1. 1 1
      dynasm/dasm_ppc.h

+ 1 - 1
dynasm/dasm_ppc.h

@@ -342,7 +342,7 @@ int dasm_encode(Dst_DECL, void *buffer)
 	case DASM_STOP: case DASM_SECTION: goto stop;
 	case DASM_ESC: *cp++ = *p++; break;
 	case DASM_REL_EXT:
-	  n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1);
+	  n = DASM_EXTERN(Dst, (unsigned char *)cp, (ins & 2047), 1) - 4;
 	  goto patchrel;
 	case DASM_ALIGN:
 	  ins &= 255; while ((((char *)cp - base) & ins)) *cp++ = 0x60000000;