From 26adbf2cb7377730b63a0ef182a402060eb732d3 Mon Sep 17 00:00:00 2001 From: Jakub Konka Date: Thu, 3 Aug 2023 00:12:30 +0200 Subject: [PATCH] macho: set first and last atom indexes to 0 when marking section for pruning --- src/link/MachO/dead_strip.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/link/MachO/dead_strip.zig b/src/link/MachO/dead_strip.zig index 82a174a1a8..563d68cc89 100644 --- a/src/link/MachO/dead_strip.zig +++ b/src/link/MachO/dead_strip.zig @@ -465,8 +465,8 @@ fn prune(zld: *Zld, alive: AtomTable) void { section.last_atom_index = prev_index; } else { assert(section.header.size == 0); - section.first_atom_index = undefined; - section.last_atom_index = undefined; + section.first_atom_index = 0; + section.last_atom_index = 0; } }