Linux ELF OS ABI

John Reiser jreiser@bitwagon.com
Fri Feb 19 16:12:00 GMT 2010


On 02/19/2010 06:47 AM, Jakub Jelinek wrote:

> At least glibc provides (through symbol versioning) backwards compatibility
> (and other libraries ought to as well, when they aren't changing SONAME).
> Which means if you compile/link against older glibc, it will work well
> against a newer one.

That's in theory.  In practice there have been bugs and glitches,
enough so that I developed the ability to run a given main executable
program with its particular version of glibc, independent of the default
version that is installed on the machine, and independent of any other
main executable:
    http://bitwagon.com/rtldi/rtldi.html

> So, you want to compile/link against the oldest glibc
> (and with oldest gcc and other parts of the toolchain) you want to support.

Yes.

> In Fedora/RHEL world you can use mock for that, other distros likely have
> something similar and if they don't, just prepare such a chroot yourself.

Again, that's in theory.  In practice, in order to reproduce and debug
customer-reported interactions between your own software, the language
runtime environment, other applications, and the operating system kernel,
then often it helps to reproduce the entire environment.  That means
having a multi-booted machine or two with each release installed on
its own root partition.  (Sometimes using multiple virtualized instances
helps, sometimes it doesn't.)  Beware SELinux: the policies of the
mounted and mounted-on filesystems must match.  Serially mounting
the same "data" partition on multiple systems with different versions
of SELinux policy can cause trouble easily.

-- 



More information about the Binutils mailing list