The libstExit native is currently explicitly linked with `libjvm.so` due to the direct JNI_GetDefaultJavaVMInitArgs usage in test/hotspot/jtreg/runtime/jni/atExit/libatExit.c. The direct call to JNI_GetDefaultJavaVMInitArgs in libatExit.c has no issue when running on static JDK, however requiring explicitly linking with `libjvm.so` is problematic with static JDK support:
1. There is no libjvm.so in static-jdk. One could try to link a libjvm.so from a 'regulard' JDK image. However, at runtime a libjvm.so does not exist when running on static JDK.
2. There is no need to link libExit with a static libjvm.a either. The JNI_GetDefaultJavaVMInitArgs symbol can be resolved from the main executable, as libjvm.a is statically linked with the launcher executable.
1. There is no libjvm.so in static-jdk. One could try to link a libjvm.so from a 'regulard' JDK image. However, at runtime a libjvm.so does not exist when running on static JDK.
2. There is no need to link libExit with a static libjvm.a either. The JNI_GetDefaultJavaVMInitArgs symbol can be resolved from the main executable, as libjvm.a is statically linked with the launcher executable.
- causes
-
JDK-8349752 Tier1 build failure caused by JDK-8349178
-
- Resolved
-
- relates to
-
JDK-8349284 Make libExplicitAttach work on static JDK
-
- Resolved
-
- links to
-
Commit(master) openjdk/jdk/84b32cb6
-
Review(master) openjdk/jdk/23431