History

Revert 337dc84b (other -static fix)

this should work now with 05f6aa1a.

Michael Matz committed 7 years ago

Commit 45b8b0e1 parent 05f6aa11 file · +5 −1Browse files

Unified · Split

x86_64-gen.c+5−1
@@ -625,7 +625,11 @@ static void gcall_or_jmp(int is_jmp) · 624 unmodified lines
625 if ((vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST &&625 if ((vtop->r & (VT_VALMASK | VT_LVAL)) == VT_CONST &&
626 ((vtop->r & VT_SYM) && (vtop->c.i-4) == (int)(vtop->c.i-4))) {626 ((vtop->r & VT_SYM) && (vtop->c.i-4) == (int)(vtop->c.i-4))) {
627 /* constant symbolic case -> simple relocation */627 /* constant symbolic case -> simple relocation */
628 greloca(cur_text_section, vtop->sym, ind + 1, R_X86_64_PLT32, (int)(vtop->c.i-4));628#ifdef TCC_TARGET_PE
629 greloca(cur_text_section, vtop->sym, ind + 1, R_X86_64_PC32, (int)(vtop->c.i-4));
630#else
631 greloca(cur_text_section, vtop->sym, ind + 1, R_X86_64_PLT32, (int)(vtop->c.i-4));
632#endif
629 oad(0xe8 + is_jmp, 0); /* call/jmp im */633 oad(0xe8 + is_jmp, 0); /* call/jmp im */
630 } else {634 } else {
631 /* otherwise, indirect call */635 /* otherwise, indirect call */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t