Hello!
The Kaffe project (www.kaffe.org) is now suffering from a bug in the
current (CVS/HEAD) libtool.
When an executable is linked both against "normal" libraries and modules
to be dlopened the modules always appear first in the compiler command
line, regardless of their order in the libtool command line
This may cause unresolved symbols when static linking is used and
the modules call some functions in the "normal" library.
No one test in the libtool testsuite can currently detect the problem.
The attached patch makes "mdemo" detect the problem. It can be installed
as a separate test or as a patch against mdemo.
ChangeLog:
* mdemo/Makefile.am: new library libbar.la for testing the linking
order
* mdemo/main.c: move most functionality to...
* mdemo/bar1.c: new file
* mdemo/bar2.c: new file defining test_callback()
* mdemo/foo1.c (hello): call test_callback
* mdemo/foo2.c (hello): Likewise
As you can see, mdemo.static cannot be linkled anymore. There is no fix
yet. Hopefully people more experiences in dlopen() matters can do it
better/faster.
Pavel Roskin
mdemo.diff.gz