Bug in wc.

Denys Vlasenko vda.linux at googlemail.com
Sun Apr 4 14:08:15 UTC 2010


On Sunday 04 April 2010 14:53, Rob Landley wrote:
> On Friday 02 April 2010 18:39:36 Denys Vlasenko wrote:
> 
> >      [Requesting program interpreter: /lib/ld-uClibc.so.0]
> 
> You'll notice that's a hardwired absolute path.  If you check all the other 
> binaries on your system (including the ones your host came with), you'll 
> notice they have hardwired absolute paths for this too.

I know. But different binaries can have different program interpreters,
nobody says it must be in /lib/. Check any distro which has
dual 32/64-bit x86 packages.

For example, on my laptop, I have "mostly 64-bit" Fedora.
"Native" 64-bit binaries use /lib64/ld-linux-x86-64.so.2 interpreter.
32-bit ones use /lib/ld-linux.so.2 one.
And it's not limited to "can install 32-bit packages",
I can compile new 32-executables too: gcc -m32 t.c,
and they load successfully.

Even though it looks like Fedora hacked in this support
instead of doing it in a generic manner (suffix "64" looks arbitrary,
it's not a proper (sub)arch suffix or something like that),
but it shows that it's possible to make it happen.

With your toolschains, this is not possible as of now,
because they all use /lib without any (sub)arch suffix.

> > And do you think it might make sense for you
> > to use /lib-$CROSS instead of /lib for every (cross-)compiler,
> > making it possible to run many dynamically linked programs
> > against different sub-arches on the same machine?
> 
> I could, sure.  But you'd still need to use the emulator to run 'em, at which 
> point running 'em in a chroot or via a system image makes about as much sense.
> 
> > This will be an overkill for the case when one runs just a plain
> > one-subarch, but it will still work for that case too, right?
> 
> It would work, yes.
> 
> Let's talk over the design issues at CELF next week.  If you're serious about 
> this use case I can put a config option into my build to automate it for you, 
> but I'd like to demonstrate scriptable system images to you first.  I think 
> they're a better way to do this sort of thing.

Ok, let's do it.
-- 
vda


More information about the busybox mailing list