This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Linux ELF OS ABI
- From: "Kevin P. Fleming" <kpfleming at digium dot com>
- To: Doug Semler <dougsemler at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Thu, 18 Feb 2010 16:36:30 -0600
- Subject: Re: Linux ELF OS ABI
- Openpgp: id=05FB8DB2
- References: <960e7eac1002181343s100cb484gd273c64015d7518c@mail.gmail.com>
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