This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Fix h_errno namespace (bug 18520)
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Joseph Myers <joseph at codesourcery dot com>, libc-alpha at sourceware dot org
- Date: Thu, 11 Jun 2015 21:59:04 -0400
- Subject: Re: Fix h_errno namespace (bug 18520)
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot DEB dot 2 dot 10 dot 1506112133130 dot 15628 at digraph dot polyomino dot org dot uk>
On 06/11/2015 05:33 PM, Joseph Myers wrote:
> The 2008 edition of POSIX removed h_errno, but some functions still
> bring in references to the h_errno external symbol. As this symbol is
> not a part of the public ABI (only __h_errno_location is), this patch
> fixes this by renaming the GLIBC_PRIVATE TLS symbol to __h_errno.
>
> Tested for x86_64 and x86 (testsuite, and comparison of installed
> shared libraries). Disassembly of all shared libraries using h_errno
> changes because of the renaming (and changes to associated TLS / GOT
> offsets in some cases); disassembly of libpthread on x86_64 changes
> more substantially because the enlargement of .dynsym affects
> subsequent addresses.
>
> 2015-06-11 Joseph Myers <joseph@codesourcery.com>
>
> [BZ #18520]
> * inet/herrno.c (h_errno): Rename to __h_errno.
> (__libc_h_errno): Define as alias of __h_errno not h_errno.
> * include/netdb.h [IS_IN_LIB && !IS_IN (libc)] (h_errno): Define
> to __h_errno instead of h_errno.
> * nptl/herrno.c (h_errno): Rename to __h_errno.
> (__h_errno_location): Refer to __h_errno not h_errno.
> * resolv/Versions (h_errno): Rename to __h_errno.
> * conform/Makefile (test-xfail-XOPEN2K8/grp.h/linknamespace):
> Remove variable.
> (test-xfail-XOPEN2K8/pwd.h/linknamespace): Likewise.
>
Looks good to me.
c.