aboutsummaryrefslogtreecommitdiff
path: root/src/link/MachO/synthetic.zig
diff options
context:
space:
mode:
authorJakub Konka <kubkon@jakubkonka.com>2024-03-14 17:04:23 +0100
committerJakub Konka <kubkon@jakubkonka.com>2024-03-15 08:17:10 +0100
commitd565c5dfcdcd6753ed0d00a7f6cccdc87d2b99a2 (patch)
treeb2e93c0a33a7c9ec46e5a121bbc1ed6fd261762f /src/link/MachO/synthetic.zig
parent5193da3422f7a63bb7ff4395da08db3782908e33 (diff)
downloadzig-d565c5dfcdcd6753ed0d00a7f6cccdc87d2b99a2.tar.gz
zig-d565c5dfcdcd6753ed0d00a7f6cccdc87d2b99a2.zip
macho: fix a sad typo in calculating the address of a TLV pointer
Diffstat (limited to 'src/link/MachO/synthetic.zig')
-rw-r--r--src/link/MachO/synthetic.zig2
1 files changed, 1 insertions, 1 deletions
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 {