projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
1.0.47.6: marginally faster ISQRT
[sbcl.git]
/
tools-for-build
/
ldso-stubs.lisp
diff --git
a/tools-for-build/ldso-stubs.lisp
b/tools-for-build/ldso-stubs.lisp
index
a361f68
..
f698e79
100644
(file)
--- a/
tools-for-build/ldso-stubs.lisp
+++ b/
tools-for-build/ldso-stubs.lisp
@@
-22,16
+22,16
@@
;;;; files for more information.
#!-sparc
;;;; files for more information.
#!-sparc
-(defun ldso-stubify (fct str)
- (format str "LDSO_STUBIFY(~A)~%" fct))
+(defun ldso-stubify (fct stream)
+ (format stream "LDSO_STUBIFY(~A)~%" fct))
;;; This is an attempt to follow DB's hint of sbcl-devel
;;; 2001-09-18. -- CSR
;;;
;;; And an attempt to work around the Sun toolchain... --ns
#!+sparc
;;; This is an attempt to follow DB's hint of sbcl-devel
;;; 2001-09-18. -- CSR
;;;
;;; And an attempt to work around the Sun toolchain... --ns
#!+sparc
-(defun ldso-stubify (fct str)
- (apply #'format str "
+(defun ldso-stubify (fct stream)
+ (apply #'format stream "
.globl ldso_stub__~A ; \\
FUNCDEF(ldso_stub__~A) ; \\
ldso_stub__~A: ; \\
.globl ldso_stub__~A ; \\
FUNCDEF(ldso_stub__~A) ; \\
ldso_stub__~A: ; \\
@@
-42,6
+42,18
@@
ldso_stub__~A: ; \\
.size ldso_stub__~A,.L~Ae1-ldso_stub__~A ;~%"
(make-list 9 :initial-element fct)))
.size ldso_stub__~A,.L~Ae1-ldso_stub__~A ;~%"
(make-list 9 :initial-element fct)))
+#!+hppa
+(defun ldso-stubify (fct stream)
+ (let ((stub (format nil "ldso_stub__~a" fct)))
+ (apply #'format stream (list
+" .export ~A
+~A:
+ .proc
+ .callinfo
+ b,n ~a
+ .procend
+ .import ~a,code~%" stub stub fct fct))))
+
(defvar *preludes* '("
/* This is an automatically generated file, please do not hand-edit it.
* See the program tools-for-build/ldso-stubs.lisp. */
(defvar *preludes* '("
/* This is an automatically generated file, please do not hand-edit it.
* See the program tools-for-build/ldso-stubs.lisp. */
@@
-57,7
+69,7
@@
ldso_stub__~A: ; \\
#endif
.text"
#endif
.text"
-#!+(or (and x86 (not darwin)) x86-64) "
+#!+(and (or x86 x86-64) (not darwin)) "
#define LDSO_STUBIFY(fct) \\
.align 16 ; \\
.globl ldso_stub__ ## fct ; \\
#define LDSO_STUBIFY(fct) \\
.align 16 ; \\
.globl ldso_stub__ ## fct ; \\
@@
-85,7
+97,11
@@
ldso_stub__ ## fct: ; \\
.L ## fct ## e1: ; \\
.size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;"
.L ## fct ## e1: ; \\
.size ldso_stub__ ## fct,.L ## fct ## e1-ldso_stub__ ## fct ;"
-#!+(and linux ppc) "
+#!+hppa "
+ .level 2.0
+ .text"
+
+#!+(and (not darwin) ppc) "
#define LDSO_STUBIFY(fct) \\
.globl ldso_stub__ ## fct ; \\
.type ldso_stub__ ## fct,@function ; \\
#define LDSO_STUBIFY(fct) \\
.globl ldso_stub__ ## fct ; \\
.type ldso_stub__ ## fct,@function ; \\
@@
-97,18
+113,18
@@
ldso_stub__ ## fct: ; \\
#!+(and darwin ppc) "
#define LDSO_STUBIFY(fct) @\\
.text @\\
#!+(and darwin ppc) "
#define LDSO_STUBIFY(fct) @\\
.text @\\
-.globl ldso_stub___ ## fct @\\
-ldso_stub___ ## fct: @\\
- b ldso_stub__ ## fct ## stub @\\
-.symbol_stub ldso_stub__ ## fct ## stub: @\\
+.globl _ldso_stub__ ## fct @\\
+_ldso_stub__ ## fct: @\\
+ b _ldso_stub__ ## fct ## stub @\\
+.symbol_stub _ldso_stub__ ## fct ## stub: @\\
.indirect_symbol _ ## fct @\\
.indirect_symbol _ ## fct @\\
- lis r11,ha16(ldso_stub__ ## fct ## $lazy_ptr) @\\
- lwz r12,lo16(ldso_stub__ ## fct ## $lazy_ptr)(r11) @\\
+ lis r11,ha16(_ldso_stub__ ## fct ## $lazy_ptr) @\\
+ lwz r12,lo16(_ldso_stub__ ## fct ## $lazy_ptr)(r11) @\\
mtctr r12 @\\
mtctr r12 @\\
- addi r11,r11,lo16(ldso_stub__ ## fct ## $lazy_ptr) @\\
+ addi r11,r11,lo16(_ldso_stub__ ## fct ## $lazy_ptr) @\\
bctr @\\
.lazy_symbol_pointer @\\
bctr @\\
.lazy_symbol_pointer @\\
-ldso_stub__ ## fct ## $lazy_ptr: @\\
+_ldso_stub__ ## fct ## $lazy_ptr: @\\
.indirect_symbol _ ## fct @\\
.long dyld_stub_binding_helper"
.indirect_symbol _ ## fct @\\
.long dyld_stub_binding_helper"
@@
-117,8
+133,8
@@
ldso_stub__ ## fct ## $lazy_ptr: @\\
#define LDSO_STUBIFY(fct) \\
.text ; \\
.align 4 ; \\
#define LDSO_STUBIFY(fct) \\
.text ; \\
.align 4 ; \\
-.globl ldso_stub___ ## fct ; \\
-ldso_stub___ ## fct: ; \\
+.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: ; \\
jmp L ## fct ## $stub ; \\
.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5 ; \\
L ## fct ## $stub: ; \\
@@
-130,6
+146,15
@@
L ## fct ## $stub: ; \\
hlt ; \\
.subsections_via_symbols ; "
hlt ; \\
.subsections_via_symbols ; "
+;;; darwin x86-64
+#!+(and darwin x86-64) "
+#define LDSO_STUBIFY(fct) \\
+ .align 4 ; \\
+.globl _ldso_stub__ ## fct ; \\
+_ldso_stub__ ## fct: ; \\
+ jmp _ ## fct ; \\
+.L ## fct ## e1: ; "
+
;;; 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
;;; 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
@@
-195,6
+220,7
@@
ldso_stub__ ## fct: ; \\
"fork"
"free"
"fstat"
"fork"
"free"
"fstat"
+ #!+inode64 "fstat$INODE64"
"fsync"
"ftruncate"
"getcwd"
"fsync"
"ftruncate"
"getcwd"
@@
-225,6
+251,7
@@
ldso_stub__ ## fct: ; \\
"log1p"
"lseek"
"lstat"
"log1p"
"lseek"
"lstat"
+ #!+inode64 "lstat$INODE64"
"malloc"
"memmove"
"mkdir"
"malloc"
"memmove"
"mkdir"
@@
-233,10
+260,12
@@
ldso_stub__ ## fct: ; \\
"open"
"opendir"
"pipe"
"open"
"opendir"
"pipe"
+ "poll"
"pow"
"read"
"readdir"
"readlink"
"pow"
"read"
"readdir"
"readlink"
+ "realpath"
"recv"
"rename"
"rmdir"
"recv"
"rename"
"rmdir"
@@
-248,6
+277,7
@@
ldso_stub__ ## fct: ; \\
"sinh"
"socket"
"stat"
"sinh"
"socket"
"stat"
+ #!+inode64 "stat$INODE64"
"strerror"
"strlen"
"symlink"
"strerror"
"strlen"
"symlink"
@@
-261,10
+291,11
@@
ldso_stub__ ## fct: ; \\
"tcsetattr"
"truncate"
"ttyname"
"tcsetattr"
"truncate"
"ttyname"
- "tzname"
+ #!-hpux "tzname"
"unlink"
"utimes"
"wait3"
"unlink"
"utimes"
"wait3"
+ "waitpid"
"write")
;; These aren't needed on the X86 because they're microcoded into the
;; FPU, so the Lisp VOPs can implement them directly without having to
"write")
;; These aren't needed on the X86 because they're microcoded into the
;; FPU, so the Lisp VOPs can implement them directly without having to
@@
-289,15
+320,20
@@
ldso_stub__ ## fct: ; \\
;; #!-linkage-table, as we only need these stubs if
;; we don't have linkage-table. Done this way now to
;; cut down on the number of ports affected.
;; #!-linkage-table, as we only need these stubs if
;; we don't have linkage-table. Done this way now to
;; cut down on the number of ports affected.
- #!-(or win32 darwin freebsd)
+ #!-(or win32 darwin freebsd netbsd openbsd)
'("ptsname"
"grantpt"
"unlockpt")
'("ptsname"
"grantpt"
"unlockpt")
- #!-darwin
+ #!+openbsd
+ '("openpty")
'("dlclose"
"dlerror"
"dlopen"
"dlsym")
'("dlclose"
"dlerror"
"dlopen"
"dlsym")
+ #!+bsd
+ '("sysctl")
+ #!+darwin
+ '("sysctlbyname")
#!+os-provides-dladdr
'("dladdr")
#!-sunos ;; !defined(SVR4)
#!+os-provides-dladdr
'("dladdr")
#!-sunos ;; !defined(SVR4)