Skip to content

Commit

Permalink
macho: error out on unhandled input stab symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
kubkon committed Jan 4, 2024
1 parent e6a4070 commit 93cb5b2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MachO/Object.zig
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ fn initSymbols(self: *Object, macho_file: *MachO) !void {
try self.symbols.ensureUnusedCapacity(gpa, slice.items(.nlist).len);

for (slice.items(.nlist), slice.items(.atom), 0..) |nlist, atom_index, i| {
if (nlist.stab()) {
macho_file.base.fatal("{}: TODO handle input stab symbols", .{self.fmtPath()});
return error.ParseFailed;
}
if (nlist.ext()) {
const name = self.getString(nlist.n_strx);
const off = try macho_file.string_intern.insert(gpa, name);
Expand Down

0 comments on commit 93cb5b2

Please sign in to comment.