diff options
| author | Shinichiro Hamaji <shinichiro.hamaji _at_ gmail.com> | 2009-04-16 02:41:24 +0900 |
|---|---|---|
| committer | grischka <grischka> | 2009-04-18 15:08:01 +0200 |
| commit | 51a7f163ad4a363953ae744afbc12cd7bd381097 (patch) | |
| tree | 2a3cb37f5c9d6c3c93aeb0eb384ceb19722640af /tccelf.c | |
| parent | 83fd36333a691050663a15c07b385bdf554bf01d (diff) | |
| download | tinycc-51a7f163ad4a363953ae744afbc12cd7bd381097.tar.gz tinycc-51a7f163ad4a363953ae744afbc12cd7bd381097.tar.bz2 | |
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.
Diffstat (limited to 'tccelf.c')
| -rw-r--r-- | tccelf.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); |
