From: Daniel B. <da...@te...> - 2003-08-07 17:19:55
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [ CCed sbcl-help in the hope of reaching actual users who aren't also developers ] Brian Mastenbrook <cha...@ac...> writes: > I'm looking from some feedback from anybody who interfaces SBCL with FFI > code. > When you load foreign code, do you load more than one DSO, and do > undefined symbols in one of these DSOs resolve to symbols in another of > these DSOs? Can this situation be worked around on OS X? For Linux, and I'm guessing for other ELF-based platforms, the convention when linking a library is to pass -l options for other libraries it depends on. For example :; ldd /usr/X11R6/lib/libXt.so.6 libX11.so.6 =3D> /usr/X11R6/lib/libX11.so.6 (0x40054000) libSM.so.6 =3D> /usr/X11R6/lib/libSM.so.6 (0x40110000) libICE.so.6 =3D> /usr/X11R6/lib/libICE.so.6 (0x40118000) libc.so.6 =3D> /lib/libc.so.6 (0x4012d000) libdl.so.2 =3D> /lib/libdl.so.2 (0x4023d000) /lib/ld-linux.so.2 =3D> /lib/ld-linux.so.2 (0x80000000) so I would expect that references to, say, XOpenDisplay in libXt will get resolved to libX11 even if Xt is dlopened without RTLD_GLOBAL. In fact, I would tend to consider that a library not built this is buggy. If SBCL is using RTLD_GLOBAL it's at least as likely for historical nobody-quite-understood-this or it-used-to-be-buggy[*] reasons as it is for any actual purpose.=20=20 [*] I have a dim recollection that, yes, it was buggy, once upon a time. Early Linux libc 5, or so. =2D -dan =2D --=20 http://www.cliki.net/ - Link farm for free CL-on-Unix resources=20 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/MonvHDK5ZnWQiRMRArfwAKC/Dv9aBXiCW/ZgLnmyW5XOreGPGACfR1jA /Kr5qD6OeJG/8OFzHL3Pu1c=3D =3DSeji =2D----END PGP SIGNATURE----- |