On 10/06/13 06:33, Bruce Perens wrote:
>> often this is achieved by "emulation"
>> packages ... a bit of a kludge.
> I think this was using BOCHS or something. Nobody does it that way any
> longer, there is no emulation necessary to run a 32 bit process on a 64
> bit kernel. The kernel is able to start a process in 32 bit or 64 bit
> mode, and will handle system calls with both the 32 and 64 bit data. The
> 32 and 64 bit versions of ld-linux.so and all of the shared libraries
> and executables run in "native mode".
Yeah, I know of Bochs, but no, this was not using Bochs. These
"emulation" packages... note my use of quotes... were just packaged
32-bit versions of libraries set up to slot into the multilib directory
paths.
They "emulated" the 32-bit environment that a 32-bit application would
expect to see by supplying libraries with the correct ABI. Basically
take the equivalent 32-bit library, strip out the stuff that goes in
/usr/bin, etc,... move the stuff in /usr/lib to /usr/lib32, and package
that up.
Messy, but it works, since ld then finds the libraries for the right
ABI. It's less painful if your distribution is binary-based, more a
problem for source-based distributions.
The correct fix is for the package to be split up into ABI-specific and
ABI-nonspecific parts, and have the package manager know to manage the
dependencies for the separate ABIs. This is the approach that Gentoo
was moving towards. I don't know about other distributions.