aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorksrini <none@none>2008-06-17 13:08:15 -0700
committerksrini <none@none>2008-06-17 13:08:15 -0700
commit172300aaebdff36514f65b1e83b81ab05387c22d (patch)
tree79a617d9ef6d8cbe4fc6f43067e0016b5f6ba984
parentbc070b436ba982c6b08083cf3d9bfae27dc9402e (diff)
6714758: hotspot: provide an entry point to the BootStrap Class loader[dholmes,acorn]
Summary: adds JVM_FindClassFromBootLoader entry point, for jdk's use Reviewed-by: dholmes, acorn
-rw-r--r--make/linux/makefiles/mapfile-vers-debug1
-rw-r--r--make/linux/makefiles/mapfile-vers-product1
-rw-r--r--make/solaris/makefiles/mapfile-vers1
-rw-r--r--make/solaris/makefiles/reorder_COMPILER1_i4861
-rw-r--r--make/solaris/makefiles/reorder_COMPILER1_sparc1
-rw-r--r--make/solaris/makefiles/reorder_COMPILER2_amd641
-rw-r--r--make/solaris/makefiles/reorder_COMPILER2_i4861
-rw-r--r--make/solaris/makefiles/reorder_COMPILER2_sparc1
-rw-r--r--make/solaris/makefiles/reorder_COMPILER2_sparcv91
-rw-r--r--make/solaris/makefiles/reorder_TIERED_amd641
-rw-r--r--make/solaris/makefiles/reorder_TIERED_i4861
-rw-r--r--make/solaris/makefiles/reorder_TIERED_sparc1
-rw-r--r--make/windows/makefiles/vm.make21
-rw-r--r--src/share/vm/prims/jvm.cpp24
-rw-r--r--src/share/vm/prims/jvm.h11
15 files changed, 61 insertions, 7 deletions
diff --git a/make/linux/makefiles/mapfile-vers-debug b/make/linux/makefiles/mapfile-vers-debug
index da8e6798f..56eb8d67f 100644
--- a/make/linux/makefiles/mapfile-vers-debug
+++ b/make/linux/makefiles/mapfile-vers-debug
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
+ JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
diff --git a/make/linux/makefiles/mapfile-vers-product b/make/linux/makefiles/mapfile-vers-product
index 7f5407c13..f724cc494 100644
--- a/make/linux/makefiles/mapfile-vers-product
+++ b/make/linux/makefiles/mapfile-vers-product
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
+ JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
diff --git a/make/solaris/makefiles/mapfile-vers b/make/solaris/makefiles/mapfile-vers
index f7ed56e5f..9a131ae05 100644
--- a/make/solaris/makefiles/mapfile-vers
+++ b/make/solaris/makefiles/mapfile-vers
@@ -89,6 +89,7 @@ SUNWprivate_1.1 {
JVM_FillInStackTrace;
JVM_FindClassFromClass;
JVM_FindClassFromClassLoader;
+ JVM_FindClassFromBootLoader;
JVM_FindLibraryEntry;
JVM_FindLoadedClass;
JVM_FindPrimitiveClass;
diff --git a/make/solaris/makefiles/reorder_COMPILER1_i486 b/make/solaris/makefiles/reorder_COMPILER1_i486
index cee930fd1..bab5b288d 100644
--- a/make/solaris/makefiles/reorder_COMPILER1_i486
+++ b/make/solaris/makefiles/reorder_COMPILER1_i486
@@ -2175,6 +2175,7 @@ text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_;
text: .text%jni_GetStringUTFRegion: jni.o;
text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%JVM_IsInterface;
text: .text%JVM_GetClassDeclaredConstructors;
text: .text%__1cNmethodOopDescOis_initializer6kM_i_;
diff --git a/make/solaris/makefiles/reorder_COMPILER1_sparc b/make/solaris/makefiles/reorder_COMPILER1_sparc
index d135e73cf..0dc59eddd 100644
--- a/make/solaris/makefiles/reorder_COMPILER1_sparc
+++ b/make/solaris/makefiles/reorder_COMPILER1_sparc
@@ -1500,6 +1500,7 @@ text: .text%__1cQjava_lang_StringGlength6FpnHoopDesc__i_;
text: .text%jni_GetStringUTFRegion: jni.o;
text: .text%__1cQjava_lang_StringOas_utf8_string6FpnHoopDesc_ii_pc_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%JVM_IsInterface;
text: .text%JVM_GetClassDeclaredConstructors;
text: .text%__1cNmethodOopDescOis_initializer6kM_i_;
diff --git a/make/solaris/makefiles/reorder_COMPILER2_amd64 b/make/solaris/makefiles/reorder_COMPILER2_amd64
index b4bc7db5b..4531671c6 100644
--- a/make/solaris/makefiles/reorder_COMPILER2_amd64
+++ b/make/solaris/makefiles/reorder_COMPILER2_amd64
@@ -4339,6 +4339,7 @@ text: .text%__1cSComputeAdapterInfoIdo_float6M_v_;
text: .text%__1cFParseLarray_store6MnJBasicType__v_;
text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_;
text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_;
text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_;
diff --git a/make/solaris/makefiles/reorder_COMPILER2_i486 b/make/solaris/makefiles/reorder_COMPILER2_i486
index 4113159bf..14a1fc2e3 100644
--- a/make/solaris/makefiles/reorder_COMPILER2_i486
+++ b/make/solaris/makefiles/reorder_COMPILER2_i486
@@ -4755,6 +4755,7 @@ text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_and_dispatch6MpnITemplat
text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cPshrI_eReg_1NodeEsize6kMpnNPhaseRegAlloc__I_;
text: .text%__1cHi2bNodeMideal_Opcode6kM_i_: ad_i486_misc.o;
text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o;
diff --git a/make/solaris/makefiles/reorder_COMPILER2_sparc b/make/solaris/makefiles/reorder_COMPILER2_sparc
index 4eadf379c..26ef9b2cd 100644
--- a/make/solaris/makefiles/reorder_COMPILER2_sparc
+++ b/make/solaris/makefiles/reorder_COMPILER2_sparc
@@ -3713,6 +3713,7 @@ text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_;
text: .text%__1cQregI_to_stkINodeHis_Copy6kM_I_: ad_sparc_misc.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%signalHandler;
text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_: typeArrayKlassKlass.o;
text: .text%JVM_handle_solaris_signal;
diff --git a/make/solaris/makefiles/reorder_COMPILER2_sparcv9 b/make/solaris/makefiles/reorder_COMPILER2_sparcv9
index 3cc6b8b51..5f4949f02 100644
--- a/make/solaris/makefiles/reorder_COMPILER2_sparcv9
+++ b/make/solaris/makefiles/reorder_COMPILER2_sparcv9
@@ -3735,6 +3735,7 @@ text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cQjava_lang_ThreadRget_thread_status6FpnHoopDesc__n0AMThreadStatus__;
text: .text%__1cIMulINodeGadd_id6kM_pknEType__: classes.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cHTypePtrFempty6kM_i_;
text: .text%__1cQaddP_reg_regNodeEsize6kMpnNPhaseRegAlloc__I_;
text: .text%__1cbFunnecessary_membar_volatileNodePoper_input_base6kM_I_: ad_sparc_misc.o;
diff --git a/make/solaris/makefiles/reorder_TIERED_amd64 b/make/solaris/makefiles/reorder_TIERED_amd64
index b4bc7db5b..4531671c6 100644
--- a/make/solaris/makefiles/reorder_TIERED_amd64
+++ b/make/solaris/makefiles/reorder_TIERED_amd64
@@ -4339,6 +4339,7 @@ text: .text%__1cSComputeAdapterInfoIdo_float6M_v_;
text: .text%__1cFParseLarray_store6MnJBasicType__v_;
text: .text%__1cOmangle_name_on6FpnMoutputStream_pnNsymbolOopDesc_ii_v_: nativeLookup.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cZCallInterpreterDirectNodeSalignment_required6kM_i_;
text: .text%__1cZCallInterpreterDirectNodePoper_input_base6kM_I_;
text: .text%__1cZCallInterpreterDirectNodeEemit6kMrnKCodeBuffer_pnNPhaseRegAlloc__v_;
diff --git a/make/solaris/makefiles/reorder_TIERED_i486 b/make/solaris/makefiles/reorder_TIERED_i486
index 4113159bf..14a1fc2e3 100644
--- a/make/solaris/makefiles/reorder_TIERED_i486
+++ b/make/solaris/makefiles/reorder_TIERED_i486
@@ -4755,6 +4755,7 @@ text: .text%__1cbCAbstractInterpreterGeneratorVgenerate_and_dispatch6MpnITemplat
text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cNTemplateTableDdef6FnJBytecodesECode_inITosState_3pFi_vi_v_;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%__1cPshrI_eReg_1NodeEsize6kMpnNPhaseRegAlloc__I_;
text: .text%__1cHi2bNodeMideal_Opcode6kM_i_: ad_i486_misc.o;
text: .text%__1cMmatch_option6FpknMJavaVMOption_pkcp4_i_: arguments.o;
diff --git a/make/solaris/makefiles/reorder_TIERED_sparc b/make/solaris/makefiles/reorder_TIERED_sparc
index 4eadf379c..26ef9b2cd 100644
--- a/make/solaris/makefiles/reorder_TIERED_sparc
+++ b/make/solaris/makefiles/reorder_TIERED_sparc
@@ -3713,6 +3713,7 @@ text: .text%__1cITemplateKinitialize6MinITosState_1pFi_vi_v_;
text: .text%__1cITemplateIgenerate6MpnZInterpreterMacroAssembler__v_;
text: .text%__1cQregI_to_stkINodeHis_Copy6kM_I_: ad_sparc_misc.o;
text: .text%JVM_FindClassFromClassLoader;
+text: .text%JVM_FindClassFromBootLoader;
text: .text%signalHandler;
text: .text%__1cTtypeArrayKlassKlassIoop_size6kMpnHoopDesc__i_: typeArrayKlassKlass.o;
text: .text%JVM_handle_solaris_signal;
diff --git a/make/windows/makefiles/vm.make b/make/windows/makefiles/vm.make
index c911ab261..99a29cf26 100644
--- a/make/windows/makefiles/vm.make
+++ b/make/windows/makefiles/vm.make
@@ -88,13 +88,20 @@ AGCT_EXPORT=/export:AsyncGetCallTrace
!endif
!endif
-LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
- /export:JNI_GetDefaultJavaVMInitArgs /export:JNI_CreateJavaVM \
- /export:JNI_GetCreatedJavaVMs /export:jio_snprintf \
- /export:jio_printf /export:jio_fprintf \
- /export:jio_vfprintf /export:jio_vsnprintf $(AGCT_EXPORT) \
- /export:JVM_GetVersionInfo \
- /export:JVM_GetThreadStateNames /export:JVM_GetThreadStateValues \
+LINK_FLAGS=$(LINK_FLAGS) $(STACK_SIZE) /subsystem:windows /dll /base:0x8000000 \
+ /export:JNI_GetDefaultJavaVMInitArgs \
+ /export:JNI_CreateJavaVM \
+ /export:JVM_FindClassFromBootLoader \
+ /export:JNI_GetCreatedJavaVMs \
+ /export:jio_snprintf \
+ /export:jio_printf \
+ /export:jio_fprintf \
+ /export:jio_vfprintf \
+ /export:jio_vsnprintf \
+ $(AGCT_EXPORT) \
+ /export:JVM_GetVersionInfo \
+ /export:JVM_GetThreadStateNames \
+ /export:JVM_GetThreadStateValues \
/export:JVM_InitAgentProperties
CPP_INCLUDE_DIRS=\
diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp
index deaba3a9e..4e584425a 100644
--- a/src/share/vm/prims/jvm.cpp
+++ b/src/share/vm/prims/jvm.cpp
@@ -624,6 +624,30 @@ JVM_ENTRY(void, JVM_ResolveClass(JNIEnv* env, jclass cls))
if (PrintJVMWarnings) warning("JVM_ResolveClass not implemented");
JVM_END
+// Rationale behind JVM_FindClassFromBootLoader
+// a> JVM_FindClassFromClassLoader was never exported in the export tables.
+// b> because of (a) java.dll has a direct dependecy on the unexported
+// private symbol "_JVM_FindClassFromClassLoader@20".
+// c> the launcher cannot use the private symbol as it dynamically opens
+// the entry point, so if something changes, the launcher will fail
+// unexpectedly at runtime, it is safest for the launcher to dlopen a
+// stable exported interface.
+// d> re-exporting JVM_FindClassFromClassLoader as public, will cause its
+// signature to change from _JVM_FindClassFromClassLoader@20 to
+// JVM_FindClassFromClassLoader and will not be backward compatible
+// with older JDKs.
+// Thus a public/stable exported entry point is the right solution,
+// public here means public in linker semantics, and is exported only
+// to the JDK, and is not intended to be a public API.
+
+JVM_ENTRY(jclass, JVM_FindClassFromBootLoader(JNIEnv* env,
+ const char* name,
+ jboolean throwError))
+ JVMWrapper3("JVM_FindClassFromBootLoader %s throw %s", name,
+ throwError ? "error" : "exception");
+ return JVM_FindClassFromClassLoader(env, name, JNI_FALSE,
+ (jobject)NULL, throwError);
+JVM_END
JVM_ENTRY(jclass, JVM_FindClassFromClassLoader(JNIEnv* env, const char* name,
jboolean init, jobject loader,
diff --git a/src/share/vm/prims/jvm.h b/src/share/vm/prims/jvm.h
index feaf0d4a1..da9305713 100644
--- a/src/share/vm/prims/jvm.h
+++ b/src/share/vm/prims/jvm.h
@@ -390,6 +390,17 @@ JVM_FindClassFromClassLoader(JNIEnv *env, const char *name, jboolean init,
jobject loader, jboolean throwError);
/*
+ * Find a class from a boot class loader. Throw ClassNotFoundException
+ * or NoClassDefFoundError depending on the value of the last
+ * argument. This is the same as FindClassFromClassLoader but provided
+ * as a convenience method exported correctly on all platforms for
+ * JSR 277 launcher class loading.
+ */
+JNIEXPORT jclass JNICALL
+JVM_FindClassFromBootLoader(JNIEnv *env, const char *name,
+ jboolean throwError);
+
+/*
* Find a class from a given class.
*/
JNIEXPORT jclass JNICALL