From 49f63be22cdd35809aed180f859afaf5dd8ef862 Mon Sep 17 00:00:00 2001 From: Jason Feng Date: Thu, 12 Dec 2024 07:59:02 -0500 Subject: [PATCH] Fix JDK24 Windows unresolved external symbols Signed-off-by: Jason Feng --- runtime/j9vm/exports.cmake | 4 ++-- runtime/j9vm/j9vmnatives.xml | 8 ++++++-- runtime/jcl/exports.cmake | 4 ++-- runtime/jcl/uma/se6_vm-side_natives_exports.xml | 8 ++++++-- runtime/oti/jclprots.h | 2 ++ 5 files changed, 18 insertions(+), 8 deletions(-) diff --git a/runtime/j9vm/exports.cmake b/runtime/j9vm/exports.cmake index a006f9559fc..2c8d7b79149 100644 --- a/runtime/j9vm/exports.cmake +++ b/runtime/j9vm/exports.cmake @@ -144,8 +144,6 @@ jvm_add_exports(jvm post_block pre_block # Additions for Java 7 - _JVM_GetStackAccessControlContext@8 - _JVM_GetInheritedAccessControlContext@8 _JVM_GetArrayLength@8 _JVM_GetArrayElement@12 _JVM_GetStackTraceElement@12 @@ -466,6 +464,8 @@ endif() if(JAVA_SPEC_VERSION LESS 24) jvm_add_exports(jvm _JVM_GetClassContext@4 + _JVM_GetInheritedAccessControlContext@8 + _JVM_GetStackAccessControlContext@8 ) else() jvm_add_exports(jvm diff --git a/runtime/j9vm/j9vmnatives.xml b/runtime/j9vm/j9vmnatives.xml index 8835eebb696..4d460ef6dbb 100644 --- a/runtime/j9vm/j9vmnatives.xml +++ b/runtime/j9vm/j9vmnatives.xml @@ -160,8 +160,12 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex - - + + + + + + diff --git a/runtime/jcl/exports.cmake b/runtime/jcl/exports.cmake index eb6832377ec..60023c9142f 100644 --- a/runtime/jcl/exports.cmake +++ b/runtime/jcl/exports.cmake @@ -374,8 +374,6 @@ omr_add_exports(jclse Java_java_lang_reflect_Proxy_defineClass0__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BII Java_java_lang_reflect_Proxy_defineClass0__Ljava_lang_ClassLoader_2Ljava_lang_String_2_3BIILjava_lang_Object_2_3Ljava_lang_Object_2Ljava_lang_Object_2 Java_java_lang_reflect_Proxy_defineClassImpl - Java_java_security_AccessController_getAccSnapshot - Java_java_security_AccessController_getCallerPD Java_java_util_stream_IntPipeline_promoteGPUCompile Java_jdk_internal_misc_Unsafe_allocateDBBMemory Java_jdk_internal_misc_Unsafe_copySwapMemory0 @@ -456,6 +454,8 @@ endif() if(JAVA_SPEC_VERSION LESS 24) omr_add_exports(jclse + Java_java_security_AccessController_getAccSnapshot + Java_java_security_AccessController_getCallerPD Java_java_security_AccessController_initializeInternal ) endif() diff --git a/runtime/jcl/uma/se6_vm-side_natives_exports.xml b/runtime/jcl/uma/se6_vm-side_natives_exports.xml index 9e5ce856d07..b8a780711eb 100644 --- a/runtime/jcl/uma/se6_vm-side_natives_exports.xml +++ b/runtime/jcl/uma/se6_vm-side_natives_exports.xml @@ -299,8 +299,12 @@ - - + + + + + + diff --git a/runtime/oti/jclprots.h b/runtime/oti/jclprots.h index 63f45a0ef13..99c2c644af3 100644 --- a/runtime/oti/jclprots.h +++ b/runtime/oti/jclprots.h @@ -921,8 +921,10 @@ jobject JNICALL Java_java_lang_reflect_Array_multiNewArrayImpl(JNIEnv *env, jcla /* java_lang_Class.c */ jobject JNICALL Java_java_lang_Class_getDeclaredAnnotationsData(JNIEnv *env, jobject jlClass); jobject JNICALL Java_java_lang_Class_getStackClasses(JNIEnv *env, jclass jlHeapClass, jint maxDepth, jboolean stopAtPrivileged); +#if JAVA_SPEC_VERSION < 24 jobject JNICALL Java_java_security_AccessController_getAccSnapshot(JNIEnv* env, jclass jsAccessController, jint startingFrame, jboolean forDoPrivilegedWithCombiner); jobject JNICALL Java_java_security_AccessController_getCallerPD(JNIEnv* env, jclass jsAccessController, jint startingFrame); +#endif /* JAVA_SPEC_VERSION < 24 */ jobject JNICALL Java_com_ibm_oti_vm_VM_getClassNameImpl(JNIEnv *env, jclass recv, jclass jlClass, jboolean internAndAssign); jobject JNICALL Java_java_lang_Class_getDeclaredFieldImpl(JNIEnv *env, jobject recv, jstring jname); jarray JNICALL Java_java_lang_Class_getDeclaredFieldsImpl(JNIEnv *env, jobject recv);