Display an ERR() in case of undefined symbols.
This commit is contained in:
parent
5644cdc1f5
commit
c23bf4336c
|
@ -63,7 +63,16 @@ void *BUILTIN32_dlopen( const char *name )
|
||||||
strcat( buffer, ".so" );
|
strcat( buffer, ".so" );
|
||||||
|
|
||||||
if (!(handle = ELFDLL_dlopen( buffer, RTLD_NOW )))
|
if (!(handle = ELFDLL_dlopen( buffer, RTLD_NOW )))
|
||||||
WARN( "failed to load %s: %s\n", buffer, dlerror() );
|
{
|
||||||
|
LPSTR pErr, p;
|
||||||
|
pErr = dlerror();
|
||||||
|
p = strchr(pErr, ':');
|
||||||
|
if ((p) &&
|
||||||
|
(!strncmp(p, ": undefined symbol", 18))) /* undef symbol -> ERR() */
|
||||||
|
ERR("failed to load %s: %s\n", buffer, pErr);
|
||||||
|
else /* WARN() for libraries that are supposed to be native */
|
||||||
|
WARN("failed to load %s: %s\n", buffer, pErr );
|
||||||
|
}
|
||||||
return handle;
|
return handle;
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue