From b1964451e123050c9062eb605894d712a195cb27 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Thu, 22 Aug 2019 15:14:27 +0100 Subject: [PATCH] Fix the AArch64 small object class lookup. This was generating a relocation that didn't do the right thing and didn't raise linker errors. Now it is using GOT-relative addressing. In combination with the last two commits, this now makes all of the objc_msgSend tests pass on AArch64. Fixes #105 --- objc_msgSend.aarch64.S | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/objc_msgSend.aarch64.S b/objc_msgSend.aarch64.S index 6d0b327..fd14d26 100644 --- a/objc_msgSend.aarch64.S +++ b/objc_msgSend.aarch64.S @@ -79,7 +79,8 @@ ldp \receiver, x8, [sp], #(ARGUMENT_SPILL_SIZE + 16) br x9 6: - adr x10, SmallObjectClasses + adrp x10, :got:SmallObjectClasses + ldr x10, [x10, :got_lo12:SmallObjectClasses] ldr x9, [x10, x9, lsl #3] b 1b .cfi_endproc