public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "Gabriel F. T. Gomes" <gabriel@inconstante.eti.br>,
	Zack Weinberg <zackw@panix.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH 2/9] Add __vfscanf_internal and __vfwscanf_internal with flags arguments.
Date: Fri, 29 Jun 2018 14:12:00 -0000	[thread overview]
Message-ID: <b9fbdba3-4e17-69b4-36be-b82316a14653@redhat.com> (raw)
In-Reply-To: <20180326122752.64b6591b@tereshkova>

On 03/26/2018 05:27 PM, Gabriel F. T. Gomes wrote:
> On Wed, 07 Mar 2018, Zack Weinberg wrote:
> 
>> (It was necessary to introduce ldbl_compat_symbol for _IO_vfscanf.
>> Please check that part of the patch very carefully, I am still not
>> confident I understand all of the details of ldbl-opt.)
> 
> It looks good on powerpc64...  Oldest symbol (where long double had the
> same format as double) is still there as a compat symbol with version
> GLIBC_2.3...  The newer symbol, is a bit different, in the sense that it
> is now a compat symbol (it was a default symbol previously).
> 
> Here's what readelf has to tell us:
> 
> Before the patch set:
>    1355: 00000000001eea70   124 FUNC    GLOBAL DEFAULT   27 _IO_vfscanf@GLIBC_2.3
>    1356: 00000000001f0a98 23552 FUNC    GLOBAL DEFAULT   27 _IO_vfscanf@@GLIBC_2.4
> 
> After the patch set:
>    1355: 00000000001f0bd0   136 FUNC    GLOBAL DEFAULT   27 _IO_vfscanf@GLIBC_2.4
>    1356: 00000000001ee968   136 FUNC    GLOBAL DEFAULT   27 _IO_vfscanf@GLIBC_2.3

I think that's correct and intended because there is no user redirect to 
_IO_vfscanf in public headers, and libndbl_nonshared.a does not use this 
interface, either (it uses __nldbl__IO_vfscanf).

>> --- a/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
>> +++ b/sysdeps/ieee754/ldbl-opt/math_ldbl_opt.h
>> @@ -20,10 +20,14 @@
>>    long_double_symbol (libc, __GL_##name##_##aliasname, aliasname);
>> # define long_double_symbol_1(lib, local, symbol, version) \
>>    versioned_symbol (lib, local, symbol, version)
>> +# define ldbl_compat_symbol(lib, local, symbol, version) \
>> +  compat_symbol (lib, local, symbol, LONG_DOUBLE_COMPAT_VERSION)
>> #else
>> # define ldbl_hidden_def(local, name) libc_hidden_def (name)
>> # define ldbl_strong_alias(name, aliasname) strong_alias (name, aliasname)
>> # define ldbl_weak_alias(name, aliasname) weak_alias (name, aliasname)
>> +# define ldbl_compat_symbol(lib, local, symbol, version) \
>> +  compat_symbol (lib, local, symbol, version)
> 
> I believe that Adhemerval's comment is correct and ldbl_compat_symbol
> should translate to nothing when building static libraries.

The shared library should not contain any definition for the compat 
symbol.  The SHLIB_COMPAT mechanism takes care of that.

But I do wonder if we need this mechanism at all.  Wouldn't it be more 
appropriate to define LONG_DOUBLE_COMPAT_VERSION by default, as 
GLIBC_2_0, and then just use

compat_symbol (libc, __IO_vfscanf, _IO_vfscanf, LONG_DOUBLE_COMPAT_VERSION);

?

This pretends that GLIBC_2_0 already underwent the long double 
transition, and this seems somewhat consistent to me.

Thanks,
Florian

  reply	other threads:[~2018-06-29 14:12 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-07 19:32 [PATCH 0/9] Use more flags parameters instead of global bits in stdio Zack Weinberg
2018-03-07 19:32 ` [PATCH 3/9] Use SCANF_ISOC99_A instead of _IO_FLAGS2_SCANF_STD Zack Weinberg
2018-03-26 15:35   ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 8/9] Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl Zack Weinberg
2018-03-07 19:32 ` [PATCH 6/9] Add __vsyslog_internal, with same flags as __v*printf_internal Zack Weinberg
2018-03-13 11:59   ` Florian Weimer
2018-03-13 12:39     ` Zack Weinberg
2018-03-13 12:43       ` Florian Weimer
2018-03-13 13:37         ` Zack Weinberg
2018-03-13 13:50           ` Florian Weimer
2018-03-13 14:11             ` Zack Weinberg
2018-03-13 14:13               ` Florian Weimer
2018-03-07 19:32 ` [PATCH 1/9] Use STRFMON_LDBL_IS_DBL instead of __ldbl_is_dbl Zack Weinberg
2018-03-12 20:36   ` Adhemerval Zanella
2018-03-12 21:11     ` Zack Weinberg
2018-03-13 11:45       ` Adhemerval Zanella
2018-03-26 15:17   ` Gabriel F. T. Gomes
2018-03-26 15:40     ` Zack Weinberg
2018-03-26 15:52       ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 5/9] Add __v*printf_internal with flags arguments Zack Weinberg
2018-03-26 15:41   ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 4/9] Use SCANF_LDBL_IS_DBL instead of __ldbl_is_dbl Zack Weinberg
2018-03-14 12:22   ` Florian Weimer
2018-03-26 15:36   ` Gabriel F. T. Gomes
2018-03-07 19:32 ` [PATCH 2/9] Add __vfscanf_internal and __vfwscanf_internal with flags arguments Zack Weinberg
2018-03-13 12:35   ` Adhemerval Zanella
2018-06-29 14:04     ` Florian Weimer
2018-03-26 15:28   ` Gabriel F. T. Gomes
2018-06-29 14:12     ` Florian Weimer [this message]
2018-06-29 14:24   ` Florian Weimer
2018-06-29 14:29   ` Florian Weimer
2018-03-07 19:51 ` [PATCH 7/9] Use PRINTF_FORTIFY instead of _IO_FLAGS2_FORTIFY Zack Weinberg
2018-03-07 19:51 ` [PATCH 9/9] Post-cleanup: don't include math.h/math_private.h in math_ldbl_opt.h Zack Weinberg
2018-03-12 15:29 ` [PATCH 0/9] Use more flags parameters instead of global bits in stdio Zack Weinberg
2018-03-26 15:16 ` Gabriel F. T. Gomes
2018-03-26 15:47   ` Zack Weinberg
2018-06-27 15:50 ` Florian Weimer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b9fbdba3-4e17-69b4-36be-b82316a14653@redhat.com \
    --to=fweimer@redhat.com \
    --cc=gabriel@inconstante.eti.br \
    --cc=libc-alpha@sourceware.org \
    --cc=zackw@panix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).