diff --git a/src/java.base/share/native/libjimage/jimage.cpp b/src/java.base/share/native/libjimage/jimage.cpp index 5c901944e79..40625b4ecfe 100644 --- a/src/java.base/share/native/libjimage/jimage.cpp +++ b/src/java.base/share/native/libjimage/jimage.cpp @@ -35,6 +35,15 @@ #include "imageFile.hpp" +#include "jni_util.h" + +/* + * Declare jimage library specific JNI_Onload entry for static build. + */ +extern "C" { +DEF_STATIC_JNI_OnLoad +} + /* * JImageOpen - Given the supplied full path file name, open an image file. This * function will also initialize tables and retrieve meta-data necessary to diff --git a/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c b/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c index cf66b7184e3..0e1ef479222 100644 --- a/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c +++ b/src/jdk.hotspot.agent/share/native/libsaproc/sadis.c @@ -66,6 +66,7 @@ #include "jni_util.h" +DEF_STATIC_JNI_OnLoad /* * Class: sun_jvm_hotspot_asm_Disassembler