This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] Reduce use of libioP.h and iolibio.h outside the stdio implementation.
- From: Zack Weinberg <zackw at panix dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 31 Dec 2017 17:36:39 -0800
- Subject: Re: [PATCH 1/3] Reduce use of libioP.h and iolibio.h outside the stdio implementation.
- Authentication-results: sourceware.org; auth=none
- References: <20171226061052.20907-1-zackw@panix.com> <20171226061052.20907-2-zackw@panix.com> <alpine.DEB.2.20.1801010122040.28505@digraph.polyomino.org.uk>
On Sun, Dec 31, 2017 at 5:24 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> On Tue, 26 Dec 2017, Zack Weinberg wrote:
>
>> Please carefully review my use of the ldbl_*/libc_* distinction, which
>> I do not fully understand; it might be necessary to introduce
>> ldbl_hidden_weak, which we don't currently have.
>
>> diff --git a/libio/vasprintf.c b/libio/vasprintf.c
>> index a9a21545a2..cf7ad0a972 100644
>> --- a/libio/vasprintf.c
>> +++ b/libio/vasprintf.c
>> @@ -85,4 +85,5 @@ _IO_vasprintf (char **result_ptr, const char *format, _IO_va_list args)
>> (*result_ptr)[needed - 1] = '\0';
>> return ret;
>> }
>> +ldbl_strong_alias (_IO_vasprintf, __vasprintf)
>> ldbl_weak_alias (_IO_vasprintf, vasprintf)
>
> I think the point of ldbl_strong_alias / ldbl_weak_alias is that they
> define the main symbol using long_double_symbol (i.e. give it an explicit
> symbol version). Since __vasprintf is not a public symbol in
> ieee754/ldbl-opt/Versions at version NLDBL_VERSION, I don't think it
> should logically be using ldbl_strong_alias (although such usage is also
> fairly harmless - the symbol won't actually get exported without being
> listed in a Versions file).
Yes, and it turns out check-abi-libc objects to this usage (but only
on targets where the nldbl-opt versions of the ldbl_* macros are
used). A revised patch is coming Real Soon Now (I keep discovering
problems that require me to run additional complete build-many-glibcs
cycles to validate fixes).
zw