Changeset 15086


Ignore:
Timestamp:
Nov 21, 2011, 5:57:27 PM (8 years ago)
Author:
gb
Message:

Use link_map.l_ld macro to hide platform dependencies. (Android
thinks that the field is an unsigned integer.)

File:
1 edited

Legend:

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

    r14975 r15086  
    171171    `(%get-ptr ,ptr ,offset)))
    172172
     173(defmacro link_map.l_ld (ptr)
     174  (let* ((record (%find-foreign-record :link_map))
     175         (field (%find-foreign-record-type-field record :l_ld))
     176         (offset (/ (foreign-record-field-offset field) 8)))
     177    `(%get-ptr ,ptr ,offset)))
     178
    173179(defun soname-ptr-from-link-map (map)
    174180  (let* ((path (pref map :link_map.l_name)))
     
    180186        path
    181187        (with-macptrs ((dyn-strings)
    182                        (dynamic-entries (pref map :link_map.l_ld)))
     188                       (dynamic-entries (link_map.l_ld map)))
    183189          (if (%null-ptr-p dynamic-entries)
    184190            (%null-ptr)
     
    257263    ;; address within the library and returns a reasonable "base address".
    258264    (when (%null-ptr-p base)
    259       (let* ((addr (%library-base-containing-address (pref m :link_map.l_ld))))
     265      (let* ((addr (%library-base-containing-address (link_map.l_ld m))))
    260266        (if addr (setq base addr))))
    261267    (unless (%null-ptr-p base)
Note: See TracChangeset for help on using the changeset viewer.