History

fixed PC32 relocation if constant address

bellard committed 24 years ago

Commit 431d6481 parent 6dd6a021 file · +4 −2Browse files

Unified · Split

i386-gen.c+4−2
@@ -360,10 +360,12 @@ void gfunc_call(GFuncContext *c) · 359 unmodified lines
360360 /* relocation case */
361361 greloc(cur_text_section, vtop->sym,
362362 ind + 1, R_386_PC32);
363− oad(0xe8, vtop->c.ul - 4);
364363 } else {
365− oad(0xe8, vtop->c.ul - ind - 5);
364+ /* put an empty PC32 relocation */
365+ put_elf_reloc(symtab_section, cur_text_section,
366+ ind + 1, R_386_PC32, 0);
366367 }
368+ oad(0xe8, vtop->c.ul - 4);
367369 } else {
368370 /* otherwise, indirect call */
369371 r = gv(RC_INT);