This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Documenting the (dynamic) linking rules for symbol versioning
- From: Siddhesh Poyarekar <siddhesh at sourceware dot org>
- To: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Cc: linux-man <linux-man at vger dot kernel dot org>, Carlos O'Donell <carlos at redhat dot com>, Rich Felker <dalias at aerifal dot cx>, "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Thu, 20 Apr 2017 18:28:12 +0530
- Subject: Re: Documenting the (dynamic) linking rules for symbol versioning
- Authentication-results: sourceware.org; auth=none
- References: <b3a962de-6703-d8b9-18f7-138185171475@gmail.com> <22f26755-f7f0-898a-ac74-3f6df92a22d7@sourceware.org> <c6736794-60bb-517e-0bcf-2e80331f0f72@gmail.com>
- Reply-to: siddhesh at sourceware dot org
On Thursday 20 April 2017 06:10 PM, Michael Kerrisk (man-pages) wrote:
> I think that I have failed to provide enough detail for
> you to understand what I meant. Consider the following:
>
> 1. We want to interpose some symbol in glibc (say, "malloc@GLIBC_2.0")
> with a symbol of our own (perhaps via a preloaded library).
> 2. In our preloaded shared library, the interposing "malloc"
> need not be a versioned symbol.
>
> At least
Ah ok, got it. The dlsym will result in picking up the latest symbol.
> Note the last line: dlsym() found xyz@@VER_2 (not xyz@VER_3).
Hmm interesting, I thought 'latest' would imply the last version in the
sequence of versions in the map, but I guess it kinda makes sense that
it is the @@ default, similar to how a static linker would pick it up.
Siddhesh