| ... | ... | @@ -58,7 +58,8 @@ fn collectRoots(zld: *Zld, roots: *AtomTable) !void { |
| 58 | 58 | const sym = zld.getSymbol(global); |
| 59 | 59 | if (sym.undf()) continue; |
| 60 | 60 | |
| 61 | | const object = zld.objects.items[global.getFile().?]; |
| 61 | const file = global.getFile() orelse continue; // synthetic globals are atomless |
| 62 | const object = zld.objects.items[file]; |
| 62 | 63 | const atom_index = object.getAtomIndexForSymbol(global.sym_index).?; // panic here means fatal error |
| 63 | 64 | _ = try roots.getOrPut(atom_index); |
| 64 | 65 | |