[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how does libc5-compat work?



On Tue, Sep 01, 1998 at 05:38:42PM +0200, Thomas Gebhardt wrote:
> obviously it is still possible to run (most) of the old libc5 binaries in
> hamm. Somehow ld knows when it is necessary to use the libs from the

ld.so, not ld.

> libc5-compat directory. How does this mechanism work?

ELF binaries contain a segment that specifies what libraries they were
linked against (objdump --all-headers thebinary), which ld.so uses in
determining which library to load the binary against.

> I have a program that segfaults; obviously it tries to use both
> libc5 *and* libc6:

That means ld.so only finds a libc6 version of a library for which the
binary needs a libc5 one.

> $ ldd secude
>         /lib/nfslock.so.0 => /lib/nfslock.so.0 (0x4000c000)
>         libsecude.so => /tmp/sec518c-linux/libsecude.so (0x4000e000)
>         libgdbm.so.1 => /usr/lib/libgdbm.so.1 (0x4016a000)
>         libdl.so.1 => /lib/libdl.so.1 (0x40170000)
>         libc.so.5 => /lib/libc.so.5 (0x40173000)
>         libc.so.6 => /lib/libc.so.6 (0x40231000)
>         ld-linux.so.2 => /lib/ld-linux.so.2 (0x402d6000)         
> 
> How can I manage to get it working?

Do objdump --all-headers secude and install the libc5 versions of all the
libraries it needs.

HTH,
Ray
-- 
Obsig: developing a new sig


Reply to: