mirror of
https://github.com/frida/tinycc
synced 2024-11-28 18:43:07 +03:00
Work around for the issue TCC doesn't handle -2147483648 properly.
TCC produces code which is incompatible with GCC for the following code: printf("%lld\n", (long long)-2147483648); printf("%lld\n", (long long)-2147483649); For now, just avoid using the corner value.
This commit is contained in:
parent
83fd36333a
commit
51a7f163ad
2
tccelf.c
2
tccelf.c
@ -685,7 +685,7 @@ static void relocate_section(TCCState *s1, Section *s)
|
||||
}
|
||||
}
|
||||
long diff = val - addr;
|
||||
if (diff < -2147483648 || diff > 2147483647) {
|
||||
if (diff <= -2147483647 || diff > 2147483647) {
|
||||
/* XXX: naive support for over 32bit jump */
|
||||
if (s1->output_type == TCC_OUTPUT_MEMORY) {
|
||||
val = add_jmp_table(s1, val);
|
||||
|
Loading…
Reference in New Issue
Block a user