authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-03-20 16:12:51+01:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-03-20 16:12:55+01:00
log5b5466626810302371b2d21c39e7ad04ea13a8dc
tree8ca524edb1ce05ae20e95e855f99fbb5318b63b1
parent9a203fa7894cde183dc04bdfea63d9aea18c52da

macho+zld: relax assumption about dead strip atoms uniqueness

In case the compiler outputted an object file that is not slicable into subsections, entry point may overlap with a section atom which is perfectly fine, so don't panic in that case.

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

src/link/MachO/dead_strip.zig+1-1
......@@ -102,7 +102,7 @@ fn collectRoots(zld: *Zld, roots: *AtomTable) !void {
102102 };
103103
104104 if (is_gc_root) {
105 try roots.putNoClobber(atom_index, {});
105 _ = try roots.getOrPut(atom_index);
106106
107107 log.debug("root(ATOM({d}, %{d}, {?d}))", .{
108108 atom_index,