| ... | @@ -165,6 +165,7 @@ pub fn dedupLiterals(self: InternalObject, lp: MachO.LiteralPool, macho_file: *M | ... | @@ -165,6 +165,7 @@ pub fn dedupLiterals(self: InternalObject, lp: MachO.LiteralPool, macho_file: *M |
| 165 | if (target.getLiteralPoolIndex(macho_file)) |lp_index| { | 165 | if (target.getLiteralPoolIndex(macho_file)) |lp_index| { |
| 166 | const lp_atom = lp.getAtom(lp_index, macho_file); | 166 | const lp_atom = lp.getAtom(lp_index, macho_file); |
| 167 | if (target.atom_index != lp_atom.atom_index) { | 167 | if (target.atom_index != lp_atom.atom_index) { |
| | 168 | lp_atom.alignment = lp_atom.alignment.max(target.alignment); |
| 168 | target.flags.alive = false; | 169 | target.flags.alive = false; |
| 169 | rel.target = lp_atom.atom_index; | 170 | rel.target = lp_atom.atom_index; |
| 170 | } | 171 | } |
| ... | @@ -176,6 +177,7 @@ pub fn dedupLiterals(self: InternalObject, lp: MachO.LiteralPool, macho_file: *M | ... | @@ -176,6 +177,7 @@ pub fn dedupLiterals(self: InternalObject, lp: MachO.LiteralPool, macho_file: *M |
| 176 | if (target_atom.getLiteralPoolIndex(macho_file)) |lp_index| { | 177 | if (target_atom.getLiteralPoolIndex(macho_file)) |lp_index| { |
| 177 | const lp_atom = lp.getAtom(lp_index, macho_file); | 178 | const lp_atom = lp.getAtom(lp_index, macho_file); |
| 178 | if (target_atom.atom_index != lp_atom.atom_index) { | 179 | if (target_atom.atom_index != lp_atom.atom_index) { |
| | 180 | lp_atom.alignment = lp_atom.alignment.max(target_atom.alignment); |
| 179 | target_atom.flags.alive = false; | 181 | target_atom.flags.alive = false; |
| 180 | target_sym.atom = lp_atom.atom_index; | 182 | target_sym.atom = lp_atom.atom_index; |
| 181 | } | 183 | } |
| ... | @@ -193,6 +195,7 @@ pub fn dedupLiterals(self: InternalObject, lp: MachO.LiteralPool, macho_file: *M | ... | @@ -193,6 +195,7 @@ pub fn dedupLiterals(self: InternalObject, lp: MachO.LiteralPool, macho_file: *M |
| 193 | if (atom.getLiteralPoolIndex(macho_file)) |lp_index| { | 195 | if (atom.getLiteralPoolIndex(macho_file)) |lp_index| { |
| 194 | const lp_atom = lp.getAtom(lp_index, macho_file); | 196 | const lp_atom = lp.getAtom(lp_index, macho_file); |
| 195 | if (atom.atom_index != lp_atom.atom_index) { | 197 | if (atom.atom_index != lp_atom.atom_index) { |
| | 198 | lp_atom.alignment = lp_atom.alignment.max(atom.alignment); |
| 196 | atom.flags.alive = false; | 199 | atom.flags.alive = false; |
| 197 | extra.objc_selrefs = lp_atom.atom_index; | 200 | extra.objc_selrefs = lp_atom.atom_index; |
| 198 | sym.setExtra(extra, macho_file); | 201 | sym.setExtra(extra, macho_file); |