From 1a386c9efdd234b1ada5a3a62dc1dfeb612de967 Mon Sep 17 00:00:00 2001 From: theraven Date: Mon, 14 Jan 2013 14:59:01 +0000 Subject: [PATCH] Fix the GOT-relative addressing in 32-bit message sends. Thanks to Banlu for helping track this down. --- objc_msgSend.x86-32.S | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/objc_msgSend.x86-32.S b/objc_msgSend.x86-32.S index f348adb..452cc75 100644 --- a/objc_msgSend.x86-32.S +++ b/objc_msgSend.x86-32.S @@ -78,6 +78,11 @@ jmp *%eax 6: # smallObject: push %ebx # Save old %ebx + calll 7f +7: + popl %ebx; +8: + addl $_GLOBAL_OFFSET_TABLE_+(8b-7b), %ebx leal SmallObjectClasses@GOTOFF(%ebx), %eax mov (%eax), %eax popl %ebx