[BusyBox] busybox & uclibc "relinking"

Csaba Henk ekho at renyi.hu
Wed May 21 13:57:15 UTC 2003



On Wed, 21 May 2003, Christian Zoffoli wrote:

> Csaba Henk wrote:
> > 
> > On Wed, 21 May 2003, Christian Zoffoli wrote:
> > 
> > 
> >>Hi to all.
> >>
> >>I've uclibc installed in the directory A and a busybox compiled 
> >>dynamically with the uclibc. Is it possible to substitute the busybox 
> >>linked libraries with the same libraries with another path
> >>
> >>es:
> >># ldd busybox
> >>
> >>libc.so.0 => /build/uClibc/usr/lib/libc.so.0 (0x0x40006000) 
> >>ld-uClibc.so.0 => /build/uClibc/usr/lib/ld-uClibc.so.0 (0x0x40000000)
> >>
> >>with
> >>
> >># ldd busybox
> >>
> >>libc.so.0 => /usr/lib/libc.so.0 (0x0x40006000)
> >>ld-uClibc.so.0 => /usr/lib/ld-uClibc.so.0 (0x0x40000000)
> > 
> > 
> > Recompile uClibc with SHARED_LIB_LOADER_PATH set to /usr/lib.
> > 
> > Csaba
> 
> 
> thanks for your answer.
> 
> now it seems that I have a "partial relink"
> 
> 
> # /build/uClibc/usr/bin/i386-uclibc-ldd busybox
> 
> libc.so.0 => /build/uClibc/usr/lib/libc.so.0 (0x00000000)
> /usr/lib/ld-uClibc.so.0 => /usr/lib/ld-uClibc.so.0 (0x00000000)
> 
> how could I also relink the first library ?

Wait a minit. The part of ldd's output which follows after "=>" shows the
path where the lib on the left side of "=>" is actually resolved. If you
take your binary to a machine where uClibc is installed in
/foo/lib/uClibc, then you will see ldd showing:

libc.so.0 => /foo/lib/uClibc/libc.so.0
/usr/lib/ld-uClibc.so.0 => not found

-- as the latter one is an absolute path and cannot be resolved. So in
your case, the path /build/uClibc/usr/lib is not hardlinked to your
binary, so I think there is no problem, but you will not see 

libc.so.0 => /usr/lib/libc.so.0 (0x0x40006000)
ld-uClibc.so.0 => /usr/lib/ld-uClibc.so.0 (0x0x40000000)

'till you won't install uClibc to /usr/lib. But I think this is not wha
you want.

Csaba



More information about the busybox mailing list