From d565c5dfcdcd6753ed0d00a7f6cccdc87d2b99a2 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Thu, 14 Mar 2024 17:04:23 +0100 Subject: macho: fix a sad typo in calculating the address of a TLV pointer --- src/link/MachO/synthetic.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/link/MachO/synthetic.zig b/src/link/MachO/synthetic.zig index 1afbd3ea6d..863b68f9b1 100644 --- a/src/link/MachO/synthetic.zig +++ b/src/link/MachO/synthetic.zig @@ -532,7 +532,7 @@ pub const TlvPtrSection = struct { pub fn getAddress(tlv: TlvPtrSection, index: Index, macho_file: *MachO) u64 { assert(index < tlv.symbols.items.len); const header = macho_file.sections.items(.header)[macho_file.tlv_ptr_sect_index.?]; - return header.addr + index * @sizeOf(u64) * 3; + return header.addr + index * @sizeOf(u64); } pub fn size(tlv: TlvPtrSection) usize { -- cgit v1.2.3