8080776: ARM 32 bit binaries do not run on 64 bit ARM v8 hardware
Summary: Need to know arm cpu type earlier in the init sequence to avoid illegal instruction
Reviewed-by: dholmes, dlong, bdelsart
--- a/hotspot/src/share/vm/runtime/thread.cpp Thu Jun 18 08:44:28 2015 -0400
+++ b/hotspot/src/share/vm/runtime/thread.cpp Thu Jun 18 10:47:34 2015 -0400
@@ -3273,6 +3273,9 @@
jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
extern void JDK_Version_init();
+ // Preinitialize version info.
+ VM_Version::early_initialize();
+
// Check version
if (!is_supported_jni_version(args->version)) return JNI_EVERSION;
--- a/hotspot/src/share/vm/runtime/vm_version.hpp Thu Jun 18 08:44:28 2015 -0400
+++ b/hotspot/src/share/vm/runtime/vm_version.hpp Thu Jun 18 10:47:34 2015 -0400
@@ -58,6 +58,13 @@
public:
static void initialize();
+ // This allows for early initialization of VM_Version information
+ // that may be needed later in the initialization sequence but before
+ // full VM_Version initialization is possible. It can not depend on any
+ // other part of the VM being initialized when called. Platforms that
+ // need to specialize this define VM_Version::early_initialize().
+ static void early_initialize() { }
+
// Name
static const char* vm_name();
// Vendor