X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fldso-stubs.S;h=64e721ea521783a702f4f9b0ef6a267e39d791f1;hb=89823a09e0dd2869f7fea351d887f75e70548ea7;hp=5e3351d09d88e911cfcd40d991900095005a53b5;hpb=0d669e68a1ffbea42af6216f2ae8c7d7ca12ffb6;p=sbcl.git diff --git a/src/runtime/ldso-stubs.S b/src/runtime/ldso-stubs.S index 5e3351d..64e721e 100644 --- a/src/runtime/ldso-stubs.S +++ b/src/runtime/ldso-stubs.S @@ -24,13 +24,12 @@ * provided with absolutely no warranty. See the COPYING and CREDITS * files for more information. */ +#define LANGUAGE_ASSEMBLY +#include "sbcl.h" - .file "ldso-stubs.S" - .version "01.01" -gcc2_compiled.: .text -#if defined __i386__ +#if defined LISP_FEATURE_X86 #define LDSO_STUBIFY(fct) \ .align 16 ; \ @@ -41,7 +40,17 @@ ldso_stub__ ## fct: ; \ .L ## fct ## e1: ; \ .size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ; -#elif defined alpha +#elif ((defined LISP_FEATURE_OSF1) && (defined LISP_FEATURE_ALPHA)) +/* osf1 has ancient cpp that doesn't do ## */ +#define LDSO_STUBIFY(fct) \ +.globl ldso_stub__/**/fct ; \ +ldso_stub__/**/fct: ; \ + jmp fct ; \ +.L/**/fct/**/e1: ; + + +#elif ((defined LISP_FEATURE_LINUX) && (defined LISP_FEATURE_ALPHA)) +/* but there's no reason we need to put up with that on modern (Linux) OSes */ #define LDSO_STUBIFY(fct) \ .globl ldso_stub__ ## fct ; \ .type ldso_stub__ ## fct,@function ; \ @@ -50,7 +59,7 @@ ldso_stub__ ## fct: ; \ .L ## fct ## e1: ; \ .size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ; -#elif defined ppc +#elif ((defined LISP_FEATURE_PPC) && (defined LISP_FEATURE_LINUX)) #define LDSO_STUBIFY(fct) \ .globl ldso_stub__ ## fct ; \ .type ldso_stub__ ## fct,@function ; \ @@ -58,8 +67,26 @@ ldso_stub__ ## fct: ; \ b fct ; \ .L ## fct ## e1: ; \ .size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ; + +#elif ((defined LISP_FEATURE_PPC) && (defined LISP_FEATURE_DARWIN)) +#define LDSO_STUBIFY(fct) @\ +.text @\ +.globl ldso_stub___ ## fct @\ +ldso_stub___ ## fct: @\ + b ldso_stub__ ## fct ## stub @\ +.symbol_stub ldso_stub__ ## fct ## stub: @\ +.indirect_symbol _ ## fct @\ + lis r11,ha16(ldso_stub__ ## fct ## $lazy_ptr) @\ + lwz r12,lo16(ldso_stub__ ## fct ## $lazy_ptr)(r11) @\ + mtctr r12 @\ + addi r11,r11,lo16(ldso_stub__ ## fct ## $lazy_ptr) @\ + bctr @\ +.lazy_symbol_pointer @\ +ldso_stub__ ## fct ## $lazy_ptr: @\ + .indirect_symbol _ ## fct @\ + .long dyld_stub_binding_helper -#elif defined sparc +#elif defined LISP_FEATURE_SPARC /* This is an attempt to follow DB's hint of sbcl-devel * 2001-09-18. -- CSR */ @@ -96,10 +123,12 @@ ldso_stub__ ## fct: ; \ LDSO_STUBIFY(connect) LDSO_STUBIFY(cosh) LDSO_STUBIFY(creat) +#ifndef LISP_FEATURE_DARWIN LDSO_STUBIFY(dlclose) LDSO_STUBIFY(dlerror) LDSO_STUBIFY(dlopen) LDSO_STUBIFY(dlsym) +#endif LDSO_STUBIFY(dup) LDSO_STUBIFY(dup2) LDSO_STUBIFY(execve) @@ -157,6 +186,7 @@ ldso_stub__ ## fct: ; \ LDSO_STUBIFY(send) LDSO_STUBIFY(setitimer) LDSO_STUBIFY(setpgrp) + LDSO_STUBIFY(setsid) #if !defined(SVR4) LDSO_STUBIFY(sigsetmask) #endif @@ -190,7 +220,7 @@ ldso_stub__ ## fct: ; \ * Note: There might be some other functions in this category as well. * E.g. I notice tanh() and acos() in the list above.. -- WHN 2001-06-07 */ -#if !defined __i386__ +#if !defined LISP_FEATURE_X86 LDSO_STUBIFY(sin) LDSO_STUBIFY(cos) LDSO_STUBIFY(tan)