Changeset 15355


Ignore:
Timestamp:
May 6, 2012, 5:54:09 PM (7 years ago)
Author:
gb
Message:

If a Darwin shared library is linked without the -install_name option,
ccl::soname-from-mach-header will return NIL; don't blindly clobber
shlib.soname in that case. (Non-toy libraries probably want to have
an "install_name", but we should handle the case where they don't.)

Fixes ticket:963 in the trunk.

File:
1 edited

Legend:

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

    r15271 r15355  
    711711          (when (%simple-string= name shlibname 0 0 namelen shlibnamelen)
    712712            (unless (shlib.base lib)
    713               (setf (shlib.base lib) addr
    714                     (shlib.soname lib) (soname-from-mach-header addr)))
     713              (setf (shlib.base lib) addr)
     714              (let* ((soname  (soname-from-mach-header addr)))
     715                (when soname
     716                  (setf (shlib.soname lib) soname))))
    715717            (return lib))))))))
    716718
     
    746748           (nameptr (ff-call *dyld-get-image-name* :unsigned-fullword i :address))
    747749           (name (%get-cstring nameptr ))
    748            (lib (%cons-shlib (soname-from-mach-header addr) name nil addr)))
     750           (lib (%cons-shlib (or (soname-from-mach-header addr) name) name nil addr)))
    749751      (setf (shlib.handle lib)
    750752            (ff-call *dlopen-entry* :address nameptr :unsigned-fullword (logior #$RTLD_GLOBAL #$RTLD_NOLOAD)))
Note: See TracChangeset for help on using the changeset viewer.