| ... | @@ -850,8 +850,12 @@ fn encodeInst(emit: *Emit, lowered_inst: Instruction, reloc_info: []const RelocI | ... | @@ -850,8 +850,12 @@ fn encodeInst(emit: *Emit, lowered_inst: Instruction, reloc_info: []const RelocI |
| 850 | emit.atom_id, | 850 | emit.atom_id, |
| 851 | end_offset - 4, | 851 | end_offset - 4, |
| 852 | target.symbol, | 852 | target.symbol, |
| 853 | reloc.off, | 853 | if (emit.pic) reloc.off - 4 else reloc.off, |
| 854 | .{ .X86_64 = .@"32S" }, | 854 | .{ .X86_64 = rt: { |
| | 855 | if (!emit.pic) break :rt .@"32S"; |
| | 856 | if (target.is_extern and !target.force_pcrel_direct) break :rt .GOTPCREL; |
| | 857 | break :rt .PC32; |
| | 858 | } }, |
| 855 | ) else if (emit.bin_file.cast(.coff2)) |coff| try coff.addReloc( | 859 | ) else if (emit.bin_file.cast(.coff2)) |coff| try coff.addReloc( |
| 856 | @enumFromInt(@intFromEnum(emit.atom_id)), | 860 | @enumFromInt(@intFromEnum(emit.atom_id)), |
| 857 | end_offset - 4, | 861 | end_offset - 4, |