added test to check that not yet bound symbols in shared libraries of the

Sat Feb 19 19:43:29 2000  Tim Janik  <timj@gtk.org>

        * testgmodule.c (main): added test to check that not yet bound symbols
        in shared libraries of the main module are retrievable, from David Gero.

        * gmodule-dld.c (_g_module_symbol): applied patch by David Gero
        <dgero@nortelnetworks.com>, so lookups for module_self also return
        library symbols on AIX.
This commit is contained in:
Tim Janik
2000-02-19 18:46:06 +00:00
committed by Tim Janik
parent e97d7be284
commit 60e25f269b
4 changed files with 43 additions and 8 deletions

View File

@@ -115,6 +115,15 @@ _g_module_symbol (gpointer handle,
/* should we restrict lookups to TYPE_PROCEDURE?
*/
if (handle == PROG_HANDLE)
{
/* PROG_HANDLE will only lookup symbols in the program itself, not honouring
* libraries. passing NULL as a handle will also try to lookup the symbol
* in currently loaded libraries. fix pointed out and supplied by:
* David Gero <dgero@nortelnetworks.com>
*/
handle = NULL;
}
if (shl_findsym ((shl_t*) &handle, symbol_name, TYPE_UNDEFINED, &p) != 0 ||
handle == NULL || p == NULL)
{