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
360 /* relocation case */360 /* relocation case */
361 greloc(cur_text_section, vtop->sym, 361 greloc(cur_text_section, vtop->sym,
362 ind + 1, R_386_PC32);362 ind + 1, R_386_PC32);
363 oad(0xe8, vtop->c.ul - 4);
364 } else {363 } 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);
366 }367 }
368 oad(0xe8, vtop->c.ul - 4);
367 } else {369 } else {
368 /* otherwise, indirect call */370 /* otherwise, indirect call */
369 r = gv(RC_INT);371 r = gv(RC_INT);