Skip to content

Commit

Permalink
Fix sap-foreign-symbol.
Browse files Browse the repository at this point in the history
*linkage-info* now contains offsets, not addresses.
  • Loading branch information
stassats committed May 11, 2018
1 parent 7342029 commit 4b40ec1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/code/foreign.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ if the symbol isn't found."
(when (<= sb!vm:linkage-table-space-start
addr
sb!vm:linkage-table-space-end)
(dohash ((key table-addr) *linkage-info* :locked t)
(let ((datap (listp key)))
(dohash ((key table-offset) *linkage-info* :locked t)
(let ((table-addr (+ table-offset sb!vm:linkage-table-space-start))
(datap (listp key)))
(when (<= table-addr addr (+ table-addr (1- sb!vm:linkage-table-entry-size)))
(return-from sap-foreign-symbol (if datap (car key) key))))))
#!+os-provides-dladdr
Expand Down

0 comments on commit 4b40ec1

Please sign in to comment.