On Tue, 2006-03-21 at 18:11 +0100, Ralf Wildenhues wrote: > I think it should still work without prepending. > Won't that change the dlopener order on newer MAC OS X? > > This may be the same bug that Charles reported on Cygwin long ago, that > after LoadLibrary failed dlopen was not tried?
Hi Ralf, Is this okay? Peter
Index: ChangeLog
2006-03-22 Peter O'Gorman <[EMAIL PROTECTED]>
* libltdl/loaders/preopen.c: Don't allow lt_dlopen if the
module has no symbols.
* libltdl/loaders/dlopen.c (get_vtable): Use LT_DLLOADER_APPEND.
from Ralf Wildenhues <[EMAIL PROTECTED]>
Index: libltdl/loaders/dlopen.c
===================================================================
RCS file: /sources/libtool/libtool/libltdl/loaders/dlopen.c,v
retrieving revision 1.5
diff -u -r1.5 dlopen.c
--- libltdl/loaders/dlopen.c 22 Apr 2005 10:10:30 -0000 1.5
+++ libltdl/loaders/dlopen.c 22 Mar 2006 14:52:05 -0000
@@ -69,7 +69,7 @@
vtable->module_close = vm_close;
vtable->find_sym = vm_sym;
vtable->dlloader_data = loader_data;
- vtable->priority = LT_DLLOADER_PREPEND;
+ vtable->priority = LT_DLLOADER_APPEND;
}
if (vtable && (vtable->dlloader_data != loader_data))
Index: libltdl/loaders/preopen.c
===================================================================
RCS file: /sources/libtool/libtool/libltdl/loaders/preopen.c,v
retrieving revision 1.7
diff -u -r1.7 preopen.c
--- libltdl/loaders/preopen.c 22 Apr 2005 10:10:30 -0000 1.7
+++ libltdl/loaders/preopen.c 22 Mar 2006 14:52:05 -0000
@@ -163,8 +163,16 @@
{
if (!symbol->address && streq (symbol->name, filename))
{
- module = (lt_module) lists->symlist;
- goto done;
+ /* If the next symbol's address is 0, it means that the
+ module has no symbols. In this case we will fail, in the
+ 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)
+ {
+ module = (lt_module) lists->symlist;
+ goto done;
+ }
}
}
}
signature.asc
Description: This is a digitally signed message part
