diff --git a/tccelf.c b/tccelf.c index 5e83cac..26cdb59 100644 --- a/tccelf.c +++ b/tccelf.c @@ -927,7 +927,7 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) { long long diff; diff = (long long)val - addr; - if (diff < -2147483648 || diff > 2147483647) { + if (diff < -2147483648LL || diff > 2147483647LL) { tcc_error("internal error: relocation failed"); } *(int *)ptr += diff;