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: Joseph Myers <joseph at codesourcery dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: <libc-alpha at sourceware dot org>, <fweimer at redhat dot com>
- Date: Mon, 1 Jan 2018 01:24:01 +0000
- 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>
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).
--
Joseph S. Myers
joseph@codesourcery.com