This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: libm error handling
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Rich Felker <dalias at aerifal dot cx>, Roland McGrath <roland at hack dot frob dot com>, <libc-alpha at sourceware dot org>
- Date: Wed, 1 May 2013 10:19:34 +0000
- Subject: Re: libm error handling
- References: <Pine dot LNX dot 4 dot 64 dot 1304301628510 dot 21969 at digraph dot polyomino dot org dot uk> <20130430181544 dot GG20323 at brightrain dot aerifal dot cx> <Pine dot LNX dot 4 dot 64 dot 1304301910460 dot 28945 at digraph dot polyomino dot org dot uk> <20130430195734 dot B5AB82C08F at topped-with-meat dot com> <20130430200511 dot GH20323 at brightrain dot aerifal dot cx> <20130430205519 dot C86632C088 at topped-with-meat dot com> <20130430213524 dot GJ20323 at brightrain dot aerifal dot cx> <m2a9of4r15 dot fsf at igel dot home> <20130430221230 dot GK20323 at brightrain dot aerifal dot cx> <m2sj27kw6c dot fsf at igel dot home>
On Wed, 1 May 2013, Andreas Schwab wrote:
> Rich Felker <dalias@aerifal.cx> writes:
>
> > Existing binaries with the copy relocation for signgam should not be
> > broken by changing signgam to a weak alias for __signgam internally.
>
> Yes, they are, because libm no longer updates the real signgam.
The lgamma at the old symbol version that writes to signgam (as opposed to
the one at the new symbol version that writes to __signgam) would no
longer update the real signgam (in the user's existing binary)? Or the
one at the new symbol version, writing to __signgam, would not update the
signgam that's present in a newly linked binary as a result of a copy
relocation, even though it's required to do so for XSI conformance?
If either of those issues applies then I suppose we do need the more
complicated approach I originally outlined (where old lgamma = new
__lgamma_xsi, writing to signgam, and new lgamma doesn't set any global
variable at all) - the case of newly built binaries that approach breaks
is anything expecting signgam to be set but not defining _XOPEN_SOURCE or
_GNU_SOURCE.
--
Joseph S. Myers
joseph@codesourcery.com