mirror of
https://github.com/rui314/mold.git
synced 2024-11-14 07:18:42 +03:00
[Mach-O] wip
This commit is contained in:
parent
97ed33758e
commit
a4bdd81966
@ -145,23 +145,21 @@ void Subsection::apply_reloc(Context &ctx, u8 *buf) {
|
|||||||
write(S + A);
|
write(S + A);
|
||||||
break;
|
break;
|
||||||
case X86_64_RELOC_GOT_LOAD:
|
case X86_64_RELOC_GOT_LOAD:
|
||||||
write(G - P - 4);
|
|
||||||
break;
|
|
||||||
case X86_64_RELOC_GOT:
|
case X86_64_RELOC_GOT:
|
||||||
write(G - P);
|
write(G + A - P - 4);
|
||||||
break;
|
break;
|
||||||
case X86_64_RELOC_SIGNED:
|
case X86_64_RELOC_SIGNED:
|
||||||
case X86_64_RELOC_BRANCH:
|
case X86_64_RELOC_BRANCH:
|
||||||
write(S + A - P - 4);
|
write(S + A - P - 4);
|
||||||
break;
|
break;
|
||||||
case X86_64_RELOC_SIGNED_1:
|
case X86_64_RELOC_SIGNED_1:
|
||||||
write(S + A - P - 5);
|
write(S + A - P - 3);
|
||||||
break;
|
break;
|
||||||
case X86_64_RELOC_SIGNED_2:
|
case X86_64_RELOC_SIGNED_2:
|
||||||
write(S + A - P - 6);
|
write(S + A - P - 2);
|
||||||
break;
|
break;
|
||||||
case X86_64_RELOC_SIGNED_4:
|
case X86_64_RELOC_SIGNED_4:
|
||||||
write(S + A - P - 8);
|
write(S + A - P);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Fatal(ctx) << isec << ": unknown reloc: " << (int)rel.type;
|
Fatal(ctx) << isec << ": unknown reloc: " << (int)rel.type;
|
||||||
|
Loading…
Reference in New Issue
Block a user