authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-07 09:46:13+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-07 09:50:36+02:00
log20529b8e566f174db633112eeecb017db6140632
treec82c50b089b1057a2c8d51f0745e5a633f15dad8
parent000b053271c5adb54f65230d559bfba3cbe1508b
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

Elf2: fix sparc64 lazy PLT stub branching in the wrong direction


1 files changed, 1 insertions(+), 1 deletions(-)

src/link/Elf2.zig+1-1
......@@ -11943,7 +11943,7 @@ fn ensurePltEntry(elf: *Elf, gsi: Symbol.Global.Index) Error!bool {
1194311943 // sethi (. - .plt[0]), %g1
1194411944 .{ .imm22 = .{ .imm = @truncate(got_plt_offset), .op = 0b0000001100 } },
1194511945 // ba,a %xcc, .plt[1]
11946 .{ .disp19 = .{ .disp = @truncate((got_plt_offset + 4 - 32) >> 2), .op = 0b0011000001101 } },
11946 .{ .disp19 = .{ .disp = @truncate((32 -% (got_plt_offset + 4)) >> 2), .op = 0b0011000001101 } },
1194711947 // nop
1194811948 .{ .raw = 0x0100_0000 },
1194911949 // nop