+ (let ((extern (extern-alien-name name)))
+ (values
+ (or (gethash extern table)
+ (gethash (concatenate 'base-string
+ #!+(and darwin (or x86 x86-64 ppc)) "_ldso_stub__"
+ #!-(and darwin (or x86 x86-64 ppc)) "ldso_stub__"
+ extern) table)))))
+
+(defun find-foreign-symbol-address (name)
+ "Returns the address of the foreign symbol NAME, or NIL. Does not enter the
+symbol in the linkage table, and never returns an address in the linkage-table."
+ (or (find-foreign-symbol-in-table name *static-foreign-symbols*)
+ (find-dynamic-foreign-symbol-address name)))
+
+(defun foreign-symbol-address (name &optional datap)
+ "Returns the address of the foreign symbol NAME. DATAP must be true if the
+symbol designates a variable (used only on linkage-table platforms). Returns a
+secondary value that is true if DATAP was true and the symbol is a dynamic
+foreign symbol.