Changeset 14566


Ignore:
Timestamp:
Jan 10, 2011, 7:40:50 AM (9 years ago)
Author:
gb
Message:

In ELF version of OPEN-SHARED-LIBRARY-INTERNAL, handle Android
case when mapping from handle returned by dlopen to link map.

Use the new headers for link_map, r_debug structs.

File:
1 edited

Legend:

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

    r14520 r14566  
    139139#+(or linux-target freebsd-target solaris-target)
    140140(progn
    141 #+android-target
    142 (eval-when (:compile-toplevel :execute)
    143   (def-foreign-type nil
    144       (:struct :link_map
    145          (:l_addr :unsigned)
    146          (:l_name (:* :char))
    147          (:l_ld :address)
    148          (:l_next (:* (:struct :link_map)))
    149          (:l_prev (:* (:struct :link_map)))))
    150   (def-foreign-type nil
    151       (:struct :r_debug
    152          (:r_version :int32_t)
    153          (:r_map (:* (:struct :link_map)))
    154          (:r_brk :address)
    155          (:r_state :int32_t)
    156          (:r_ldbase :address))))
    157141
    158142(defun soname-ptr-from-link-map (map)
     
    337321                         :unsigned-fullword *dlopen-flags*
    338322                         :address)))
    339          (link-map #-(or freebsd-target solaris-target) handle
     323         (link-map #+(and linux-target (not android-target)) handle
    340324                   #+(or freebsd-target solaris-target)
    341325                   (if (%null-ptr-p handle)
     
    349333                                   :int))
    350334                         (pref p :address)
    351                          (%null-ptr))))))
     335                         (%null-ptr))))
     336                   #+android-target (pref handle :soinfo.linkmap)))
    352337    (if (%null-ptr-p link-map)
    353338      (values nil (dlerror))
Note: See TracChangeset for help on using the changeset viewer.