Changeset 11518


Ignore:
Timestamp:
Dec 14, 2008, 10:49:50 AM (11 years ago)
Author:
gb
Message:

Define *RTLD-USE* as *RTLD-NEXT* on Solaris, *RTLD-DEFAULT* on other
platforms.

Use *RTLD-USE* as default library pseudohandle, which has the effect
of reverting Linux/FreeBSD/Darwin to previous behavior (before
Solaris support was addded.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-cfm-support.lisp

    r10893 r11518  
    7878;;; has a plt entry (e.g., if it happens to be referenced by the
    7979;;; lisp kernel.)  *RTLD-NEXT* is therefore a slightly better
    80 ;;; default; we've traditionaly used *RTLD-DEFAULT*.
     80;;; default; we've traditionaly used *RTLD-DEFAULT*. 
    8181(defvar *rtld-next*)
    8282(defvar *rtld-default*)
     83(defvar *rtld-use*)
    8384(setq *rtld-next* (%incf-ptr (%null-ptr) -1)
    8485      *rtld-default* (%int-to-ptr #+(or linux-target darwin-target windows-target)  0
    85                                   #-(or linux-target darwin-target windows-target)  -2))
     86                                  #-(or linux-target darwin-target windows-target)  -2)
     87      *rtld-use* #+solaris-target *rtld-next* #-solaris-target *rtld-default*)
    8688
    8789#+(or linux-target freebsd-target solaris-target)
     
    608610(defun ensure-open-shlib (c force)
    609611  (if (or (shlib.map c) (not force))
    610     *rtld-next*
     612    *rtld-use*
    611613    (error "Shared library not open: ~s" (shlib.soname c))))
    612614
     
    614616  (if c
    615617    (ensure-open-shlib c force)
    616     *rtld-next*
     618    *rtld-use*
    617619    ))
    618620
     
    630632;;; linkers don't quite get the concept ...)
    631633
    632 (defun foreign-symbol-entry (name &optional (handle *rtld-next*))
     634(defun foreign-symbol-entry (name &optional (handle *rtld-use*))
    633635  "Try to resolve the address of the foreign symbol name. If successful,
    634636return a fixnum representation of that address, else return NIL."
     
    804806
    805807
    806 (defun foreign-symbol-address (name &optional (map *rtld-next*))
     808(defun foreign-symbol-address (name &optional (map *rtld-use*))
    807809  "Try to resolve the address of the foreign symbol name. If successful,
    808810return that address encapsulated in a MACPTR, else returns NIL."
Note: See TracChangeset for help on using the changeset viewer.