X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tools-for-build%2Fldso-stubs.lisp;h=0c65ace3a976eca62faf9dc247a260e80b06adc2;hb=01e9e8c568777d6480699e6cb3947f38c3bed350;hp=6d33c02d694d357772d8bef253d587157d315055;hpb=e8607908388c96db633bb7046a4b97844642768b;p=sbcl.git diff --git a/tools-for-build/ldso-stubs.lisp b/tools-for-build/ldso-stubs.lisp index 6d33c02..0c65ace 100644 --- a/tools-for-build/ldso-stubs.lisp +++ b/tools-for-build/ldso-stubs.lisp @@ -57,7 +57,7 @@ ldso_stub__~A: ; \\ #endif .text" -#!+(or x86 x86-64) " +#!+(or (and x86 (not darwin)) x86-64) " #define LDSO_STUBIFY(fct) \\ .align 16 ; \\ .globl ldso_stub__ ## fct ; \\ @@ -112,6 +112,24 @@ ldso_stub__ ## fct ## $lazy_ptr: @\\ .indirect_symbol _ ## fct @\\ .long dyld_stub_binding_helper" +;;; darwin x86 assembler is weird and follows the ppc assembler syntax +#!+(and darwin x86) " +#define LDSO_STUBIFY(fct) \\ +.text ; \\ + .align 4 ; \\ +.globl ldso_stub___ ## fct ; \\ +ldso_stub___ ## fct: ; \\ + jmp L ## fct ## $stub ; \\ + .section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 ; \\ +L ## fct ## $stub: ; \\ + .indirect_symbol _ ## fct ; \\ + hlt ; \\ + hlt ; \\ + hlt ; \\ + hlt ; \\ + hlt ; \\ + .subsections_via_symbols ; " + ;;; KLUDGE: set up the vital fifth argument, passed on the ;;; stack. Do this unconditionally, even if the stub is for a ;;; function with few arguments: it can't hurt. We only do this for @@ -274,7 +292,7 @@ ldso_stub__ ## fct: ; \\ "dlsym") #!+os-provides-dladdr '("dladdr") - #!-(and sparc sunos) ;; !defined(SVR4) + #!-sunos ;; !defined(SVR4) '("sigsetmask"))) (with-open-file (f "src/runtime/ldso-stubs.S" :direction :output :if-exists :supersede)