diff --git a/darling/CMakeLists.txt b/darling/CMakeLists.txt index 7964f80..72d2be0 100644 --- a/darling/CMakeLists.txt +++ b/darling/CMakeLists.txt @@ -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 diff --git a/darling/dummy.c b/darling/dummy.c new file mode 100644 index 0000000..309e659 --- /dev/null +++ b/darling/dummy.c @@ -0,0 +1,5 @@ +__attribute__((visibility("default"))) +void* _objc_empty_cache; +__attribute__((visibility("default"))) +void* _objc_empty_vtable; + diff --git a/darling/x86-64/objc_msgSendSuper.S b/darling/x86-64/objc_msgSendSuper.S index 65d5abc..53dbf82 100644 --- a/darling/x86-64/objc_msgSendSuper.S +++ b/darling/x86-64/objc_msgSendSuper.S @@ -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