From: <jc...@fe...> - 2003-02-10 18:06:46
|
On Monday 10 February 2003 15:44, Rafael Laboissiere wrote: | Thanks for your useful report on library loading, Joao. | | * Jo=E3o Cardoso <jc...@fe...> [2003-02-10 15:19]: | > Back to the drivers.rc solution, Rafael. | | I will give it a try one of these days. If dlopen() is called with RTLD_NOW instead of RTLD_LAZY in the program=20 that I attached in my last e-mail, it work's OK (and its output is=20 similar to drivers.db). But libtool docs says that RTLD_LAZY is used by default, so we might=20 have a problem. However, a comment in libtool-1.4.3/libltdl/ltdl.c=20 seems to indicate that this is an issue in some platforms: /* We may have to define LT_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ With the small program is also easier to check for memory leaks with=20 valgrind, and most of the leaks come from libdl. tmpfile() also contributes a bit. Joao PS-Also usefull are some environmental variables used by ld.so: > man ld.so=20 > LD_DEBUG=3Dhelp ./po |