| ... | ... | @@ -12469,7 +12469,6 @@ fn ensurePltEntry(elf: *Elf, gsi: Symbol.Global.Index) Error!bool { |
| 12469 | 12469 | |
| 12470 | 12470 | // relocate the PLT entry to point to the .GOT.PLT entry |
| 12471 | 12471 | const got_plt_abs = got_plt_section.vaddr(elf) + got_plt_offset; |
| 12472 | | // TODO: handle overflow gracefully |
| 12473 | 12472 | const inst0: *align(1) link.loongarch.J20 = @ptrCast(plt_slice[0..4]); |
| 12474 | 12473 | const inst1: *align(1) link.loongarch.K12 = @ptrCast(plt_slice[4..8]); |
| 12475 | 12474 | elf.targetStore(inst0, .{ |
| ... | ... | @@ -12635,7 +12634,6 @@ fn flushMovedPltSection(elf: *Elf, which: enum { plt, plt_sec, got_plt }, old_ad |
| 12635 | 12634 | const target_slice = plt_slice[plt_offset..]; |
| 12636 | 12635 | |
| 12637 | 12636 | const got_plt_abs: u64 = got_plt_addr + got_plt_offset; |
| 12638 | | // TODO: handle overflow gracefully |
| 12639 | 12637 | const inst0: *align(1) link.loongarch.J20 = @ptrCast(target_slice[0..4]); |
| 12640 | 12638 | const inst1: *align(1) link.loongarch.K12 = @ptrCast(target_slice[4..8]); |
| 12641 | 12639 | |