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.
This commit is contained in:
Jakub Konka 2023-03-20 16:12:51 +01:00
parent 9a203fa789
commit 5b54666268

View File

@ -102,7 +102,7 @@ fn collectRoots(zld: *Zld, roots: *AtomTable) !void {
};
if (is_gc_root) {
try roots.putNoClobber(atom_index, {});
_ = try roots.getOrPut(atom_index);
log.debug("root(ATOM({d}, %{d}, {?d}))", .{
atom_index,