--- a/src/compiler/saptran.lisp
+++ b/src/compiler/saptran.lisp
@@ -14,9 +14,13 @@
 ;;;; DEFKNOWNs
 
 #!+linkage-table
-(deftransform foreign-symbol-address ((symbol &optional datap) (simple-string boolean))
-  (if (and (constant-lvar-p symbol) (constant-lvar-p datap))
-      `(sap-int (foreign-symbol-sap symbol datap))
+(deftransform foreign-symbol-address ((symbol &optional datap) (simple-string boolean)
+                                      * :important t :policy :fast-safe)
+  (if (and (constant-lvar-p symbol)
+           (constant-lvar-p datap)
+           #!+sb-dynamic-core (not (lvar-value datap)))
+      (values `(sap-int (foreign-symbol-sap symbol datap))
+              (or #!+sb-dynamic-core t))
       (give-up-ir1-transform)))
 
 (deftransform foreign-symbol-sap ((symbol &optional datap)
@@ -27,13 +31,18 @@
         `(foreign-symbol-sap symbol))
     #!+linkage-table
     (if (and (constant-lvar-p symbol) (constant-lvar-p datap))
-        (let ((name (lvar-value symbol))
+        (let (#!-sb-dynamic-core (name (lvar-value symbol))
               (datap (lvar-value datap)))
+          #!-sb-dynamic-core
           (if (or #+sb-xc-host t ; only static symbols on host
                   (not datap)
                   (find-foreign-symbol-in-table name *static-foreign-symbols*))
               `(foreign-symbol-sap ,name) ; VOP
-              `(foreign-symbol-dataref-sap ,name))) ; VOP
+              `(foreign-symbol-dataref-sap ,name)) ; VOP
+          #!+sb-dynamic-core
+          (if datap
+              `(foreign-symbol-dataref-sap symbol)
+              `(foreign-symbol-sap symbol)))
         (give-up-ir1-transform)))
 
 (defknown (sap< sap<= sap= sap>= sap>)