| ... | ... | @@ -681,7 +681,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void { |
| 681 | 681 | if (result.term != .Exited or result.term.Exited != 0) { |
| 682 | 682 | // TODO parse this output and surface with the Compilation API rather than |
| 683 | 683 | // directly outputting to stderr here. |
| 684 | | std.debug.print("{}", .{result.stderr}); |
| 684 | std.log.err("{}", .{result.stderr}); |
| 685 | 685 | return error.LDReportedFailure; |
| 686 | 686 | } |
| 687 | 687 | } else { |
| ... | ... | @@ -716,7 +716,7 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void { |
| 716 | 716 | if (!ok) { |
| 717 | 717 | // TODO parse this output and surface with the Compilation API rather than |
| 718 | 718 | // directly outputting to stderr here. |
| 719 | | std.debug.print("{}", .{stderr_context.data.items}); |
| 719 | std.log.err("{}", .{stderr_context.data.items}); |
| 720 | 720 | return error.LLDReportedFailure; |
| 721 | 721 | } |
| 722 | 722 | if (stderr_context.data.items.len != 0) { |
| ... | ... | @@ -736,10 +736,10 @@ fn linkWithLLD(self: *MachO, comp: *Compilation) !void { |
| 736 | 736 | // TODO We are in the position to be able to increase the padding by moving all sections |
| 737 | 737 | // by the required offset, but this requires a little bit more thinking and bookkeeping. |
| 738 | 738 | // For now, return an error informing the user of the problem. |
| 739 | | std.debug.print("Not enough padding between load commands and start of __text section:\n", .{}); |
| 740 | | std.debug.print("Offset after last load command: 0x{x}\n", .{after_last_cmd_offset}); |
| 741 | | std.debug.print("Beginning of __text section: 0x{x}\n", .{text_section.offset}); |
| 742 | | std.debug.print("Needed size: 0x{x}\n", .{needed_size}); |
| 739 | std.log.err("Not enough padding between load commands and start of __text section:\n", .{}); |
| 740 | std.log.err("Offset after last load command: 0x{x}\n", .{after_last_cmd_offset}); |
| 741 | std.log.err("Beginning of __text section: 0x{x}\n", .{text_section.offset}); |
| 742 | std.log.err("Needed size: 0x{x}\n", .{needed_size}); |
| 743 | 743 | return error.NotEnoughPadding; |
| 744 | 744 | } |
| 745 | 745 | const linkedit_segment = self.load_commands.items[self.linkedit_segment_cmd_index.?].Segment; |