One more fix for tcc -run
We don't need r_addend for addresses in PLT.
This commit is contained in:
parent
d457addfc3
commit
45e1ae2896
1 changed files with 2 additions and 1 deletions
3
tccelf.c
3
tccelf.c
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue