Apple libobjc fixes

This commit is contained in:
Lubos Dolezel 2015-11-20 22:27:11 +01:00
parent c8bdb97c1a
commit 8a615053eb
3 changed files with 10 additions and 4 deletions

View File

@ -46,6 +46,7 @@ set(objcdarwin_SRCS
common/selector.cpp
common/cfstring.cpp
dso_handle.c
dummy.c
../../../util/debug.cpp
# These two should go into Foundation

5
darling/dummy.c Normal file
View File

@ -0,0 +1,5 @@
__attribute__((visibility("default")))
void* _objc_empty_cache;
__attribute__((visibility("default")))
void* _objc_empty_vtable;

View File

@ -31,12 +31,12 @@ objc_msgSendSuper2:
movq 8(%rax), %rax // load superclass
movq %rax, -8(%rsp)
subq %rsp, 16
subq $16, %rsp
movq %rsp, %rdi
call objc_msg_lookup_super@PLT
addq %rsp, 16
addq $16, %rsp
RestoreRegisters
@ -63,13 +63,13 @@ objc_msgSendSuper2_stret:
movq 8(%rax), %rax // load superclass
movq %rax, -8(%rsp)
subq %rsp, 16
subq $16, %rsp
movq %rsp, %rdi
movq %rdx, %rsi
call objc_msg_lookup_super@PLT
addq %rsp, 16
addq $16, %rsp
RestoreRegisters