--- mdreloc.c 2016-06-15 19:17:30.000000000 -0700 +++ mdreloc.c.foo 2016-06-15 13:57:49.000000000 -0700 @@ -708,7 +708,7 @@ __asm volatile("iflush %0+8" : : "r" (where)); __asm volatile("iflush %0+4" : : "r" (where)); - } else if (offset <= (1L<<32) && (Elf_SOff)offset >= -((1L<<32) - 4)) { + } else if (offset <= (1L<<31) && (Elf_SOff)offset >= -((1L<<31) - 4)) { /* * We're within 32-bits -- we can use a direct call insn * @@ -725,7 +725,7 @@ * */ where[3] = MOV17; - where[2] = CALL | ((offset >> 4) & 0x3fffffff); + where[2] = CALL | ((offset >> 2) & 0x3fffffff); where[1] = MOV71; __asm volatile("iflush %0+12" : : "r" (where)); __asm volatile("iflush %0+8" : : "r" (where));