dlopen and static linking

Jakub Jelinek jakub@redhat.com
Tue May 27 11:34:00 GMT 2003


On Tue, May 27, 2003 at 01:06:10PM +0200, Thorsten Kukuk wrote:
> 
> Hi,
> 
> Appendend is a test case for dlopen, where a static program dlopens
> a shared library which dlopens another shared library. The second
> dlopen always seg.faults for me (call a, a.shared works).
> 
> Should this work or not? If this should not be worked, we need to
> fix RPM, which is static linked and calles dlopen.

rpm is fixed, it is not statically linked anymore.
ldd /bin/rpm
        librpm-4.2.so => /usr/lib/librpm-4.2.so (0x40032000)
        librpmdb-4.2.so => /usr/lib/librpmdb-4.2.so (0x40087000)
        librpmio-4.2.so => /usr/lib/librpmio-4.2.so (0x40166000)
        libpopt.so.0 => /usr/lib/libpopt.so.0 (0x401c4000)
        libelf.so.1 => /usr/lib/libelf.so.1 (0x401cc000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x401dc000)
        librt.so.1 => /lib/tls/librt.so.1 (0x401ea000)
        libbz2.so.1 => /usr/lib/libbz2.so.1 (0x401fe000)
        libc.so.6 => /lib/tls/libc.so.6 (0x00e80000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
But I'm afraid there are other statically linked apps which use NSS,
so the dlopen from dlopen either needs to be avoided, or fixed.

	Jakub



More information about the Libc-alpha mailing list