author | Camm Maguire <camm@debian.org> | 2014年08月14日 18:08:41 +0000 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2014年08月14日 18:08:41 +0000 |
commit | 6dda725298725c6002e88d8b96d83ee1a4587464 (patch) | |
tree | 99aa6e7f8543e77e6070bac74d8ab539345f6ed6 | |
parent | 1885327bf4a3c019b3ed22bed266aa527522bd39 (diff) | |
download | gcl-6dda725298725c6002e88d8b96d83ee1a4587464.tar.gz |
-rw-r--r-- | gcl/h/elf64_aarch64_reloc.h | 4 |
diff --git a/gcl/h/elf64_aarch64_reloc.h b/gcl/h/elf64_aarch64_reloc.h index d703033a5..f03d4496d 100644 --- a/gcl/h/elf64_aarch64_reloc.h +++ b/gcl/h/elf64_aarch64_reloc.h @@ -8,13 +8,13 @@ case R_AARCH64_CALL26: /* BL: ((S+A-P) >> 2) & 0x3ffffff. */ { long x=((long)(s+a-p))/4; - if (abs(x)&(~MASK(26))) { + if (abs(x)&(~MASK(25))) { got+=gotp; *got++=s+a; gotp++; memcpy(got,tramp,sizeof(tramp)); gotp+=sizeof(tramp)/sizeof(*got); - x=((long)(got+1))/4; + x=((long)got-p)/4; } store_vals(where,MASK(26),x); } |