This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Dynamic linking to specific .so versions
- From: Daniel Jacobowitz <drow at false dot org>
- To: Lluís Batlle <viriketo at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 31 Oct 2006 12:46:11 -0500
- Subject: Re: Dynamic linking to specific .so versions
- References: <45219fb00610310907t57a2a14vaa26911651ca4671@mail.gmail.com>
On Tue, Oct 31, 2006 at 06:07:19PM +0100, Lluís Batlle wrote:
> Hi,
>
> I've noticed that "ld" doesn't link the final ELF to the ".so"
> library, but to the ".so.X", where X is a number. At least in my Linux
> ELF system.
>
> For instance, "readelf" may show that for a given ELF program:
> 0x00000001 (NEEDED) Shared library: [libX11.so.6]
>
> I'd like to know what is the algorithm of choosing ".so.X", and not
> ".so.X.Y", or ".so". Is that hardcoded and unchangeable in ld? Is that
> Linux-ELF specific? Can that be changed?
It is the choice of each library. Take a look at the ELF generic ABI,
specifically "DT_SONAME".
--
Daniel Jacobowitz
CodeSourcery