| ... | ... | @@ -593,8 +593,14 @@ pub fn resolveRelocs(self: Atom, macho_file: *MachO, buffer: []u8) !void { |
| 593 | 593 | }; |
| 594 | 594 | try macho_file.reportParseError2( |
| 595 | 595 | file.getIndex(), |
| 596 | | "{s}: 0x{x}: 0x{x}: failed to relax relocation: type {s}, target {s}", |
| 597 | | .{ name, self.getAddress(macho_file), rel.offset, @tagName(rel.type), target }, |
| 596 | "{s}: 0x{x}: 0x{x}: failed to relax relocation: type {}, target {s}", |
| 597 | .{ |
| 598 | name, |
| 599 | self.getAddress(macho_file), |
| 600 | rel.offset, |
| 601 | rel.fmtPretty(macho_file.getTarget().cpu.arch), |
| 602 | target, |
| 603 | }, |
| 598 | 604 | ); |
| 599 | 605 | has_error = true; |
| 600 | 606 | }, |
| ... | ... | @@ -650,17 +656,17 @@ fn resolveRelocInner( |
| 650 | 656 | }.divExact; |
| 651 | 657 | |
| 652 | 658 | switch (rel.tag) { |
| 653 | | .local => relocs_log.debug(" {x}<+{d}>: {s}: [=> {x}] atom({d})", .{ |
| 659 | .local => relocs_log.debug(" {x}<+{d}>: {}: [=> {x}] atom({d})", .{ |
| 654 | 660 | P, |
| 655 | 661 | rel_offset, |
| 656 | | @tagName(rel.type), |
| 662 | rel.fmtPretty(cpu_arch), |
| 657 | 663 | S + A - SUB, |
| 658 | 664 | rel.getTargetAtom(self, macho_file).atom_index, |
| 659 | 665 | }), |
| 660 | | .@"extern" => relocs_log.debug(" {x}<+{d}>: {s}: [=> {x}] G({x}) ZG({x}) ({s})", .{ |
| 666 | .@"extern" => relocs_log.debug(" {x}<+{d}>: {}: [=> {x}] G({x}) ZG({x}) ({s})", .{ |
| 661 | 667 | P, |
| 662 | 668 | rel_offset, |
| 663 | | @tagName(rel.type), |
| 669 | rel.fmtPretty(cpu_arch), |
| 664 | 670 | S + A - SUB, |
| 665 | 671 | G + A, |
| 666 | 672 | ZIG_GOT + A, |
| ... | ... | @@ -900,11 +906,11 @@ const x86_64 = struct { |
| 900 | 906 | }, |
| 901 | 907 | else => |x| { |
| 902 | 908 | var err = try macho_file.addErrorWithNotes(2); |
| 903 | | try err.addMsg(macho_file, "{s}: 0x{x}: 0x{x}: failed to relax relocation of type {s}", .{ |
| 909 | try err.addMsg(macho_file, "{s}: 0x{x}: 0x{x}: failed to relax relocation of type {}", .{ |
| 904 | 910 | self.getName(macho_file), |
| 905 | 911 | self.getAddress(macho_file), |
| 906 | 912 | rel.offset, |
| 907 | | @tagName(rel.type), |
| 913 | rel.fmtPretty(.x86_64), |
| 908 | 914 | }); |
| 909 | 915 | try err.addNote(macho_file, "expected .mov instruction but found .{s}", .{@tagName(x)}); |
| 910 | 916 | try err.addNote(macho_file, "while parsing {}", .{self.getFile(macho_file).fmtPath()}); |