Linux ELF OS ABI
Kevin P. Fleming
kpfleming@digium.com
Thu Feb 18 22:36:00 GMT 2010
Doug Semler wrote:
> I have a shared object that I compile on one machine (Fedora 12) and
> run on another (CentOS5 or Ubuntu 8.04) machine. Things were fine
> (ensuring that we only used older APIs) running this way until
> recently. Recent compiles on the Fedora 12 machine started tagging
> the shared libraries being built with the GNU/Linux ABI rather than
> the Unknown (SYSV) ABI. The problem seems to be that on the older
> machines, the shared object loader can't parse this (i get an ELF file
> OS ABI invalid shared object when trying to load the .so file from an
> executable). An executable tagged with the GNU/Linux ABI type runs
> perfectly fine. I *think* the problems started when I updated the
> glibc to 2.11.2 on the Fedora system.
In general, this is why using Fedora for building binaries to be used on
other distros is not usually a good idea; it changes in significant ways
within the lifetime of a particular 'release'.
> What is weird is that if I link the shared object with --strip-all it
> will not work. If I then strip the shared object with strip, it is
> loadable. The only difference between the two shared object files is
> the ELF OS ABI (byte 8), otherwise they are the same.
--strip-all literally strips all symbols, and thus the symbols exposed
by the shared object are no longer present.
--
Kevin P. Fleming
Digium, Inc. | Director of Software Technologies
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
skype: kpfleming | jabber: kpfleming@digium.com
Check us out at www.digium.com & www.asterisk.org
More information about the Binutils
mailing list