| ... | ... | @@ -1632,22 +1632,7 @@ pub fn allocateAtom(self: *MachO, atom: *TextBlock, match: MatchingSection) !u64 |
| 1632 | 1632 | const sect = &seg.sections.items[match.sect]; |
| 1633 | 1633 | |
| 1634 | 1634 | const sym = &self.locals.items[atom.local_sym_index]; |
| 1635 | | // Padding is not required for pointer-type sections and any synthetic sections such as |
| 1636 | | // stubs or stub_helper. |
| 1637 | | // TODO audit this. |
| 1638 | | const needs_padding = switch (commands.sectionType(sect.*)) { |
| 1639 | | macho.S_SYMBOL_STUBS, |
| 1640 | | macho.S_NON_LAZY_SYMBOL_POINTERS, |
| 1641 | | macho.S_LAZY_SYMBOL_POINTERS, |
| 1642 | | macho.S_LITERAL_POINTERS, |
| 1643 | | macho.S_THREAD_LOCAL_VARIABLES, |
| 1644 | | => false, |
| 1645 | | else => blk: { |
| 1646 | | if (match.seg == self.text_segment_cmd_index.? and |
| 1647 | | match.sect == self.stub_helper_section_index.?) break :blk false; |
| 1648 | | break :blk true; |
| 1649 | | }, |
| 1650 | | }; |
| 1635 | const needs_padding = match.seg == self.text_segment_cmd_index.? and match.sect == self.text_section_index.?; |
| 1651 | 1636 | |
| 1652 | 1637 | var atom_placement: ?*TextBlock = null; |
| 1653 | 1638 | |