mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-26 14:54:19 +08:00
Revert 337dc84b (other -static fix)
this should work now with 05f6aa1a.
This commit is contained in:
parent
05f6aa1ade
commit
45b8b0e57d
@ -625,7 +625,11 @@ static void gcall_or_jmp(int is_jmp)
|
|||||||
if ((vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST &&
|
if ((vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST &&
|
||||||
((vtop->r & VT_SYM) && (vtop->c.i-4) == (int)(vtop->c.i-4))) {
|
((vtop->r & VT_SYM) && (vtop->c.i-4) == (int)(vtop->c.i-4))) {
|
||||||
/* constant symbolic case -> simple relocation */
|
/* constant symbolic case -> simple relocation */
|
||||||
greloca(cur_text_section, vtop->sym, ind + 1, R_X86_64_PLT32, (int)(vtop->c.i-4));
|
#ifdef TCC_TARGET_PE
|
||||||
|
greloca(cur_text_section, vtop->sym, ind + 1, R_X86_64_PC32, (int)(vtop->c.i-4));
|
||||||
|
#else
|
||||||
|
greloca(cur_text_section, vtop->sym, ind + 1, R_X86_64_PLT32, (int)(vtop->c.i-4));
|
||||||
|
#endif
|
||||||
oad(0xe8 + is_jmp, 0); /* call/jmp im */
|
oad(0xe8 + is_jmp, 0); /* call/jmp im */
|
||||||
} else {
|
} else {
|
||||||
/* otherwise, indirect call */
|
/* otherwise, indirect call */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user