diff options
Diffstat (limited to 'rts/linker/PEi386.c')
-rw-r--r-- | rts/linker/PEi386.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c index 6cf0d52d39..f2c49f6513 100644 --- a/rts/linker/PEi386.c +++ b/rts/linker/PEi386.c @@ -1961,14 +1961,14 @@ ocResolve_PEi386 ( ObjectCode* oc ) { intptr_t v; v = S + (int32_t)A - ((intptr_t)pP) - 4; - if ((v >> 32) && ((-v) >> 32)) { + if ((v > (intptr_t) INT32_MAX) || (v < (intptr_t) INT32_MIN)) { /* Make the trampoline then */ copyName (getSymShortName (info, sym), oc, symbol, sizeof(symbol)-1); S = makeSymbolExtra_PEi386(oc, symIndex, S, (char *)symbol); /* And retry */ v = S + (int32_t)A - ((intptr_t)pP) - 4; - if ((v >> 32) && ((-v) >> 32)) { + if ((v > (intptr_t) INT32_MAX) || (v < (intptr_t) INT32_MIN)) { barf("IMAGE_REL_AMD64_REL32: High bits are set in %zx for %s", v, (char *)symbol); } |