One more fix for tcc -run
We don't need r_addend for addresses in PLT.
This commit is contained in:
3
tccelf.c
3
tccelf.c
@ -735,7 +735,8 @@ ST_FUNC void relocate_section(TCCState *s1, Section *s)
|
|||||||
#ifndef TCC_TARGET_PE
|
#ifndef TCC_TARGET_PE
|
||||||
/* XXX: naive support for over 32bit jump */
|
/* XXX: naive support for over 32bit jump */
|
||||||
if (s1->output_type == TCC_OUTPUT_MEMORY) {
|
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;
|
diff = val - addr;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user