| ... | @@ -384,7 +384,10 @@ pub fn parseRelocs(self: *Atom, relocs: []macho.relocation_info, context: RelocC | ... | @@ -384,7 +384,10 @@ pub fn parseRelocs(self: *Atom, relocs: []macho.relocation_info, context: RelocC |
| 384 | // TODO rewrite relocation | 384 | // TODO rewrite relocation |
| 385 | try addStub(target, context); | 385 | try addStub(target, context); |
| 386 | }, | 386 | }, |
| 387 | .ARM64_RELOC_GOT_LOAD_PAGE21, .ARM64_RELOC_GOT_LOAD_PAGEOFF12 => { | 387 | .ARM64_RELOC_GOT_LOAD_PAGE21, |
| | 388 | .ARM64_RELOC_GOT_LOAD_PAGEOFF12, |
| | 389 | .ARM64_RELOC_POINTER_TO_GOT, |
| | 390 | => { |
| 388 | // TODO rewrite relocation | 391 | // TODO rewrite relocation |
| 389 | try addGotEntry(target, context); | 392 | try addGotEntry(target, context); |
| 390 | }, | 393 | }, |
| ... | @@ -660,7 +663,10 @@ pub fn resolveRelocs(self: *Atom, macho_file: *MachO) !void { | ... | @@ -660,7 +663,10 @@ pub fn resolveRelocs(self: *Atom, macho_file: *MachO) !void { |
| 660 | const is_via_got = got: { | 663 | const is_via_got = got: { |
| 661 | switch (arch) { | 664 | switch (arch) { |
| 662 | .aarch64 => break :got switch (@intToEnum(macho.reloc_type_arm64, rel.@"type")) { | 665 | .aarch64 => break :got switch (@intToEnum(macho.reloc_type_arm64, rel.@"type")) { |
| 663 | .ARM64_RELOC_GOT_LOAD_PAGE21, .ARM64_RELOC_GOT_LOAD_PAGEOFF12 => true, | 666 | .ARM64_RELOC_GOT_LOAD_PAGE21, |
| | 667 | .ARM64_RELOC_GOT_LOAD_PAGEOFF12, |
| | 668 | .ARM64_RELOC_POINTER_TO_GOT, |
| | 669 | => true, |
| 664 | else => false, | 670 | else => false, |
| 665 | }, | 671 | }, |
| 666 | .x86_64 => break :got switch (@intToEnum(macho.reloc_type_x86_64, rel.@"type")) { | 672 | .x86_64 => break :got switch (@intToEnum(macho.reloc_type_x86_64, rel.@"type")) { |