This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Reduce use of libioP.h and iolibio.h outside the stdio implementation.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]