diff options
| author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2010-12-28 17:44:51 +0900 |
|---|---|---|
| committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | 2010-12-28 17:44:51 +0900 |
| commit | 45e1ae28963b96b63ecca795032891d9b939e9b0 (patch) | |
| tree | d2c7eb13484a36ba867d519727e4ab1d443fed3c | |
| parent | d457addfc3ad1449cec8eabb2fcd1b4231ae82ea (diff) | |
| download | tinycc-45e1ae28963b96b63ecca795032891d9b939e9b0.tar.gz tinycc-45e1ae28963b96b63ecca795032891d9b939e9b0.tar.bz2 | |
One more fix for tcc -run
We don't need r_addend for addresses in PLT.
| -rw-r--r-- | tccelf.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -735,7 +735,8 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s) #ifndef TCC_TARGET_PE /* XXX: naive support for over 32bit jump */ if (s1->output_type == TCC_OUTPUT_MEMORY) { - val = add_jmp_table(s1, val) + rel->r_addend; + val = (add_jmp_table(s1, val - rel->r_addend) + + rel->r_addend); diff = val - addr; } #endif |
