Changeset 4823
- Timestamp:
- Jun 27, 2006, 3:33:00 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-0/l0-cfm-support.lisp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-0/l0-cfm-support.lisp
r4542 r4823 27 27 28 28 29 ; Bootstrapping. Real version is in l1-aprims.30 ; Called by expansion of with-pstrs29 ;;; Bootstrapping. Real version is in l1-aprims. 30 ;;; Called by expansion of with-pstrs 31 31 32 32 (defun byte-length (string &optional script start end) … … 78 78 (defvar *rtld-default*) 79 79 (setq *rtld-next* (%incf-ptr (%null-ptr) -1) 80 *rtld-default* (%int-to-ptr 0)) 81 82 #+linux-target 80 *rtld-default* (%int-to-ptr #+linux-target 0 81 #-linux-target -2)) 82 83 #+(or linux-target freebsd-target) 83 84 (progn 84 85 … … 129 130 (defvar *shared-libraries* nil) 130 131 131 #+ linux-target132 #+(or linux-target freebsd-target) 132 133 (progn 133 134 … … 136 137 (dynamic-entries (pref map :link_map.l_ld))) 137 138 (let* ((soname-offset nil)) 138 ;;; Walk over the entries in the file's dynamic segment; 139 ;;; the last such entry will have a tag of #$DT_NULL.140 ;;; Note the (loaded) address of the dynamic string table141 ;;; a nd the offset of the #$DT_SONAME string in that string142 ;;; table.139 ;;; Walk over the entries in the file's dynamic segment; the 140 ;;; last such entry will have a tag of #$DT_NULL. Note the 141 ;;; (loaded,on Linux; relative to link_map.l_addr on FreeBSD) 142 ;;; address of the dynamic string table and the offset of the 143 ;;; #$DT_SONAME string in that string table. 143 144 (loop 144 145 (case #+32-bit-target (pref dynamic-entries :<E>lf32_<D>yn.d_tag) … … 157 158 :<E>lf32_<D>yn.d_un.d_ptr) 158 159 #+64-bit-target 160 #+linux-target 159 161 (pref dynamic-entries 160 :<E>lf64_<D>yn.d_un.d_ptr)))) 162 :<E>lf64_<D>yn.d_un.d_ptr) 163 #+freebsd-target 164 (%inc-ptr (pref map :link_map.l_addr) 165 (pref dynamic-entries 166 :<E>lf64_<D>yn.d_un.d_val))))) 161 167 (%setf-macptr dynamic-entries 162 168 (%inc-ptr dynamic-entries … … 214 220 215 221 222 (defun %get-r-debug () 223 (let* ((addr (ff-call (%kernel-import target::kernel-import-get-r-debug) 224 address))) 225 (unless (%null-ptr-p addr) 226 addr))) 227 216 228 (defun %link-map-address () 217 (let* ((r_debug ( foreign-symbol-address "_r_debug")))229 (let* ((r_debug (%get-r-debug))) 218 230 (if r_debug 219 231 (pref r_debug :r_debug.r_map) … … 238 250 239 251 (defun init-shared-libraries () 252 #+freebsd-target (dbg) 240 253 (setq *dladdr-entry* (foreign-symbol-entry "dladdr")) 241 254 (when (null *shared-libraries*) … … 244 257 ;;; It seems to be necessary to open each of these libraries 245 258 ;;; yet again, specifying the RTLD_GLOBAL flag. 259 #+linux-target 246 260 (%dlopen-shlib l) 247 261 (setf (shlib.opened-by-lisp-kernel l) t)))) … … 466 480 (defvar *statically-linked* nil) 467 481 468 #+ linux-target482 #+(or linux-target freebsd-target) 469 483 (progn 470 484 … … 520 534 ;;; if not found in the OS list it returns nil 521 535 ;;; 522 ;;; got this error before putting in the call to NSIsObjectNameDefinedInImage 523 ;;; dyld: /usr/local/lisp/ccl/dppccl dead lock (dyld operation attempted in a thread already doing a dyld operation) 536 ;;; got this error before putting in the call to 537 ;;; NSIsObjectNameDefinedInImage dyld: /usr/local/lisp/ccl/dppccl dead 538 ;;; lock (dyld operation attempted in a thread already doing a dyld 539 ;;; operation) 524 540 ;;; 525 541 … … 570 586 ) 571 587 572 #-(or linux-target darwinppc-target )588 #-(or linux-target darwinppc-target freebsd-target) 573 589 (defun shlib-containing-entry (entry &optional name) 574 590 (declare (ignore entry name))
Note:
See TracChangeset
for help on using the changeset viewer.
