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

Re: Multiarch in Debian unstable



On Mon, 27 Jun 2011 at 15:31:24 +0200, Vincent Lefevre wrote:
> Related to that, will Linux support fat binaries[*] one day?

I doubt it; but multiarch doesn't make them any more problematic.

> If this is possible, where should they be installed, and how
> libraries would be searched in a consistent way to support
> various kinds of libraries?

If by "fat binaries" you mean executables, they'd go in ${prefix}/bin just
like normal executables do (under multi-arch or not), and the runtime
linker would have to search the appropriate linker path for whichever
architecture's part of the binary was actually being executed.

(Concrete example: I install an i386/x86-64/armel fat binary on my x86-64.
My kernel can natively execute i386 and x86-64, and it chooses to execute
the x86-64 version. The runtime linker should look in
/usr/local/lib/x86_64-linux-gnu, /usr/local/lib, and so on, in some order,
ignoring any non-x86-64 libraries it finds - but the runtime linker already
knows how to ignore unsuitable libraries, so that's easy.)

If by "fat binaries" you mean shared libraries, they could either go in
/usr/lib, or go in /usr/lib/TUPLE for every appropriate tuple (using hard
links or something). But there's no real advantage in doing that, you could
just as easily install several "thin" libraries.

    S


Reply to: