Index: libjava/configure.ac =================================================================== --- libjava/configure.ac (revision 156730) +++ libjava/configure.ac (working copy) @@ -244,9 +244,13 @@ if test "$enable_libgcj_sublibs" = yes ; then # tag "_bc" onto the end of it when we use it to generate the # spec, but that's an ugly thing to do when there are multiple # words in the string and you're relying on the ordering to - # append the correct one. - libgcj_spec_lgcj_override="-lgcj-noncore -lgcj" - libgcj_spec_lgcj_bc_override="-lgcj-noncore -lgcj_bc" + # append the correct one. Note that we add an arbitrary undef + # from libgcj-noncore to ensure the library is actually linked + # and loaded, as there aren't static dependencies to tell us + # which classes will be loaded at runtime, so we need to ensure + # that all the class data (.jcr sections) are present and initialised. + libgcj_spec_lgcj_override="-lgcj-noncore -u__ZN3org4ietf4jgss10GSSManagerC1Ev -lgcj" + libgcj_spec_lgcj_bc_override="-lgcj-noncore -u__ZN3org4ietf4jgss10GSSManagerC1Ev -lgcj_bc" fi Index: libjava/jvmti.cc =================================================================== --- libjava/jvmti.cc (revision 156730) +++ libjava/jvmti.cc (working copy) @@ -2210,6 +2210,7 @@ _Jv_GetJVMTIEnv (void) { _Jv_JVMTIEnv *env = (_Jv_JVMTIEnv *) _Jv_MallocUnchecked (sizeof (_Jv_JVMTIEnv)); + memset (env, 0, sizeof (_Jv_JVMTIEnv)); env->p = &_Jv_JVMTI_Interface; struct jvmti_env_list *element = (struct jvmti_env_list *) _Jv_MallocUnchecked (sizeof (struct jvmti_env_list));