diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-08-25 14:49:53 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-25 14:49:53 -0700 |
| commit | 849c31a6cc3d1e554f97c2ccf7aaa886070cfadd (patch) | |
| tree | c71047e77eac9215fcef554c9f583ad2a8bd2542 /src/link/MachO/Object.zig | |
| parent | 7d54c62c8a55240bbe144ab03c78573a344598ce (diff) | |
| parent | fb6f5a30b2d6334d0f1415446849d39fe00d3af0 (diff) | |
| download | zig-849c31a6cc3d1e554f97c2ccf7aaa886070cfadd.tar.gz zig-849c31a6cc3d1e554f97c2ccf7aaa886070cfadd.zip | |
Merge pull request #21177 from alexrp/elf-coff-conv
`std.{coff,elf}`: Remove the `{MachineType,EM}.toTargetCpuArch()` functions.
Diffstat (limited to 'src/link/MachO/Object.zig')
| -rw-r--r-- | src/link/MachO/Object.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/link/MachO/Object.zig b/src/link/MachO/Object.zig index 38cb82e858..ad83777906 100644 --- a/src/link/MachO/Object.zig +++ b/src/link/MachO/Object.zig @@ -91,12 +91,12 @@ pub fn parse(self: *Object, macho_file: *MachO) !void { macho.CPU_TYPE_X86_64 => .x86_64, else => |x| { try macho_file.reportParseError2(self.index, "unknown cpu architecture: {d}", .{x}); - return error.InvalidCpuArch; + return error.InvalidMachineType; }, }; if (cpu_arch != this_cpu_arch) { try macho_file.reportParseError2(self.index, "invalid cpu architecture: {s}", .{@tagName(this_cpu_arch)}); - return error.InvalidCpuArch; + return error.InvalidMachineType; } const lc_buffer = try gpa.alloc(u8, self.header.?.sizeofcmds); @@ -1648,12 +1648,12 @@ pub fn parseAr(self: *Object, macho_file: *MachO) !void { macho.CPU_TYPE_X86_64 => .x86_64, else => |x| { try macho_file.reportParseError2(self.index, "unknown cpu architecture: {d}", .{x}); - return error.InvalidCpuArch; + return error.InvalidMachineType; }, }; if (macho_file.getTarget().cpu.arch != this_cpu_arch) { try macho_file.reportParseError2(self.index, "invalid cpu architecture: {s}", .{@tagName(this_cpu_arch)}); - return error.InvalidCpuArch; + return error.InvalidMachineType; } const lc_buffer = try gpa.alloc(u8, self.header.?.sizeofcmds); |
