We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ebed846 commit 0729726Copy full SHA for 0729726
common.S
@@ -1,4 +1,4 @@
1
-#if defined(__WIN32__) || defined(__APPLE__)
+#if (defined(_WIN32) && defined(__i386__)) || defined(__APPLE__)
2
#define CDECL(symbol) _##symbol
3
#else
4
#define CDECL(symbol) symbol
objc_msgSend.x86-32.S
@@ -54,7 +54,7 @@
54
push %ecx # _cmd
55
push %eax # &self
56
.cfi_def_cfa_offset 12
57
- call slowMsgLookup@PLT
+ call CDECL(slowMsgLookup)@PLT
58
add $8, %esp # restore the stack
59
60
@@ -65,8 +65,14 @@
65
7:
66
popl %ebx;
67
8:
68
+#if __ELF__
69
+ # ELF can support GOT-relative addressing;
70
+ # PE/COFF and Mach-O need a text relocation.
71
addl $_GLOBAL_OFFSET_TABLE_+(8b-7b), %ebx
72
leal SmallObjectClasses@GOTOFF(%ebx), %eax
73
+#else
74
+ leal CDECL(SmallObjectClasses), %eax
75
+#endif
76
mov (%eax), %eax
77
popl %ebx
78
jmp 1b
0 commit comments