natRuntime.cc (_Jv_FindSymbolInExecutable): Return NULL if no library on the list has the symbol.

* java/lang/natRuntime.cc (_Jv_FindSymbolInExecutable): Return
	NULL if no library on the list has the symbol.
	(init): Call add_library on the program itself.
	* prims.cc (JvRunMain): Initialize Runtime before searching for
	`main'.
	(_Jv_RunMain): Likewise.

From-SVN: r43413
This commit is contained in:
Tom Tromey 2001-06-15 23:22:02 +00:00 committed by Tom Tromey
parent 21ea1c28cf
commit 6728a61d1f
3 changed files with 23 additions and 3 deletions

View file

@ -69,7 +69,7 @@ _Jv_FindSymbolInExecutable (const char *symname)
return r;
}
return lt_dlsym (NULL, symname);
return NULL;
}
#else
@ -199,6 +199,9 @@ java::lang::Runtime::init (void)
finalize_on_exit = false;
#ifdef USE_LTDL
lt_dlinit ();
lt_dlhandle self = lt_dlopen (NULL);
if (self != NULL)
add_library (self);
#endif
}