[BusyBox] static & shared lib

Rob Landley rob at landley.net
Fri Aug 19 15:41:40 UTC 2005


On Friday 19 August 2005 01:35, Lancelot wrote:
> I had mount the root_fs_arm.ext2 on /export/fs,
> and the directory "lib" is under the /export/fs
> in other words, it's under the base root system ("/") when my target
> mount it using NFS.
>
> So, it's not a symlink.

I'm confused: how on your system does a given executable know when to 
use /export/fs/lib and when to use /lib?  (What do you mean by "lib is under 
the /export/fs"?  Presumably there's a lib directory in there, one that's 
used for...?)

> I am using kernel 2.6.10 & mount the root file system by NFS.
> When I built busybox with share lib, it's always can run the program
> "/sbin/init".

Do you mean init continues to run after the mount, but it was execed before 
the mount?

> When it's work normal, I used ldd to get the library link of "/sbin/init".
> And I can found out all those files in the "lib",
> and then I restart the target and do the same process, but it can't
> exec "/sbin/init".

You just said that when you built busybox with shared libraries, you can 
always run /sbin/init.  You you're giving circumstances under which you 
can't?  I'm guessing that by "restart the target" you mean reexec init after 
the mount?  (Or else the version on the target is now statically linked, and 
that's what's different?)

> I want to know why and how to resolve this problem.

I'm still trying to understand how your system is set up and what you're doing 
with it...

Rob



More information about the busybox mailing list