One more fix for tcc -run

We don't need r_addend for addresses in PLT.
This commit is contained in:
Shinichiro Hamaji 2010-12-28 17:44:51 +09:00
parent d457addfc3
commit 45e1ae2896

View File

@ -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