* libltdl/loaders/preopen.c: Don't allow lt_dlopen if the

module has no symbols.
This commit is contained in:
Peter O'Gorman 2006-04-03 13:54:35 +00:00
parent 22e9ff0862
commit 3cd0ad1319
2 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2006-04-03 Peter O'Gorman <peter@pogma.com>
* libltdl/loaders/preopen.c: Don't allow lt_dlopen if the
module has no symbols.
2006-03-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux ]:

View File

@ -162,12 +162,21 @@ vm_open (lt_user_data loader_data, const char *filename)
for (symbol= lists->symlist; symbol->name; ++symbol)
{
if (!symbol->address && streq (symbol->name, filename))
{
/* If the next symbol's name and address is 0, it means
the module just contains the originator and no symbols.
In this case we pretend that we never saw the module and
hope that some other loader will be able to load the module
and have access to its symbols */
const lt_dlsymlist *next_symbol = symbol +1;
if (next_symbol->address && next_symbol->name)
{
module = (lt_module) lists->symlist;
goto done;
}
}
}
}
LT__SETERROR (FILE_NOT_FOUND);