| ... | @@ -367,6 +367,7 @@ fn mapAndUpdateSections( | ... | @@ -367,6 +367,7 @@ fn mapAndUpdateSections( |
| 367 | offset, | 367 | offset, |
| 368 | offset + size, | 368 | offset + size, |
| 369 | }); | 369 | }); |
| | 370 | log.debug(" | flags 0x{x}", .{source_sect.inner.flags}); |
| 370 | | 371 | |
| 371 | source_sect.target_map = .{ | 372 | source_sect.target_map = .{ |
| 372 | .segment_id = target_seg_id, | 373 | .segment_id = target_seg_id, |
| ... | @@ -740,6 +741,21 @@ fn getMatchingSection(self: *Zld, sect: Object.Section) !?MatchingSection { | ... | @@ -740,6 +741,21 @@ fn getMatchingSection(self: *Zld, sect: Object.Section) !?MatchingSection { |
| 740 | .seg = self.text_segment_cmd_index.?, | 741 | .seg = self.text_segment_cmd_index.?, |
| 741 | .sect = self.objc_methlist_section_index.?, | 742 | .sect = self.objc_methlist_section_index.?, |
| 742 | }; | 743 | }; |
| | 744 | } else if (mem.eql(u8, sectname, "__rodata") or |
| | 745 | mem.eql(u8, sectname, "__typelink") or |
| | 746 | mem.eql(u8, sectname, "__itablink") or |
| | 747 | mem.eql(u8, sectname, "__gosymtab") or |
| | 748 | mem.eql(u8, sectname, "__gopclntab")) |
| | 749 | { |
| | 750 | if (self.data_const_section_index == null) { |
| | 751 | self.data_const_section_index = @intCast(u16, data_const_seg.sections.items.len); |
| | 752 | try data_const_seg.addSection(self.allocator, "__const", .{}); |
| | 753 | } |
| | 754 | |
| | 755 | break :blk .{ |
| | 756 | .seg = self.data_const_segment_cmd_index.?, |
| | 757 | .sect = self.data_const_section_index.?, |
| | 758 | }; |
| 743 | } else { | 759 | } else { |
| 744 | if (self.text_const_section_index == null) { | 760 | if (self.text_const_section_index == null) { |
| 745 | self.text_const_section_index = @intCast(u16, text_seg.sections.items.len); | 761 | self.text_const_section_index = @intCast(u16, text_seg.sections.items.len); |