mirror of
git://repo.or.cz/tinycc.git
synced 2026-06-26 14:54:19 +08:00
fixed PC32 relocation if constant address
This commit is contained in:
parent
6dd6a026c3
commit
431d648096
@ -360,10 +360,12 @@ void gfunc_call(GFuncContext *c)
|
|||||||
/* relocation case */
|
/* relocation case */
|
||||||
greloc(cur_text_section, vtop->sym,
|
greloc(cur_text_section, vtop->sym,
|
||||||
ind + 1, R_386_PC32);
|
ind + 1, R_386_PC32);
|
||||||
oad(0xe8, vtop->c.ul - 4);
|
|
||||||
} else {
|
} else {
|
||||||
oad(0xe8, vtop->c.ul - ind - 5);
|
/* put an empty PC32 relocation */
|
||||||
|
put_elf_reloc(symtab_section, cur_text_section,
|
||||||
|
ind + 1, R_386_PC32, 0);
|
||||||
}
|
}
|
||||||
|
oad(0xe8, vtop->c.ul - 4);
|
||||||
} else {
|
} else {
|
||||||
/* otherwise, indirect call */
|
/* otherwise, indirect call */
|
||||||
r = gv(RC_INT);
|
r = gv(RC_INT);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user