| ... | @@ -857,24 +857,23 @@ fn getMatchingSection(self: *Zld, section: macho.section_64) ?MatchingSection { | ... | @@ -857,24 +857,23 @@ fn getMatchingSection(self: *Zld, section: macho.section_64) ?MatchingSection { |
| 857 | .seg = self.text_segment_cmd_index.?, | 857 | .seg = self.text_segment_cmd_index.?, |
| 858 | .sect = self.ustring_section_index.?, | 858 | .sect = self.ustring_section_index.?, |
| 859 | }; | 859 | }; |
| 860 | } else { | | |
| 861 | break :blk .{ | | |
| 862 | .seg = self.text_segment_cmd_index.?, | | |
| 863 | .sect = self.text_const_section_index.?, | | |
| 864 | }; | | |
| 865 | } | 860 | } |
| 866 | } else if (mem.eql(u8, segname, "__DATA")) { | 861 | break :blk .{ |
| 867 | if (mem.eql(u8, sectname, "__data")) { | 862 | .seg = self.text_segment_cmd_index.?, |
| 868 | break :blk .{ | 863 | .sect = self.text_const_section_index.?, |
| 869 | .seg = self.data_segment_cmd_index.?, | 864 | }; |
| 870 | .sect = self.data_section_index.?, | 865 | } |
| 871 | }; | 866 | if (mem.eql(u8, segname, "__DATA")) { |
| 872 | } else if (mem.eql(u8, sectname, "__const")) { | 867 | if (mem.eql(u8, sectname, "__const")) { |
| 873 | break :blk .{ | 868 | break :blk .{ |
| 874 | .seg = self.data_const_segment_cmd_index.?, | 869 | .seg = self.data_const_segment_cmd_index.?, |
| 875 | .sect = self.data_const_section_index.?, | 870 | .sect = self.data_const_section_index.?, |
| 876 | }; | 871 | }; |
| 877 | } | 872 | } |
| | 873 | break :blk .{ |
| | 874 | .seg = self.data_segment_cmd_index.?, |
| | 875 | .sect = self.data_section_index.?, |
| | 876 | }; |
| 878 | } | 877 | } |
| 879 | break :blk null; | 878 | break :blk null; |
| 880 | }, | 879 | }, |