This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH][BZ #14932] make dlsym return the newest symbol version
- From: Rich Felker <dalias at aerifal dot cx>
- To: Roland McGrath <roland at hack dot frob dot com>
- Cc: Siddhesh Poyarekar <siddhesh at redhat dot com>, libc-alpha at sourceware dot org
- Date: Fri, 19 Apr 2013 18:40:08 -0400
- Subject: Re: [PATCH][BZ #14932] make dlsym return the newest symbol version
- References: <20130416082344 dot GD3063 at spoyarek dot pnq dot redhat dot com> <20130419222804 dot EC4F52C08B at topped-with-meat dot com>
On Fri, Apr 19, 2013 at 03:28:04PM -0700, Roland McGrath wrote:
> The simple fact is that we don't know how many applications are
> (presumably unwittingly) depending on the old behavior and would be
> broken by a change, nor how many applications are presently broken and
> would be fixed by the change. The closest we have to a way to be
> right about that is to introduce a new symbol version for dlsym so
> that old binaries get the old behavior. But even that's not too
> likely to avoid application problems, because people just recompiling
> an old application probably have no idea which of the behaviors it
> implicitly expects.
If you're recompiling an old application, you'll end up linking to the
current versions of all the symbols you reference too. So it's neither
inconsistent nor additionally-harmful for dlsym to start picking up
new versions too. I think this is the best solution.
The current behavior is the worst-possible: modern, correct programs
using dlsym get dangerously-wrong results.
Rich