From: Adhemerval Zanella <adhemerval.zanella@linaro.org>
To: libc-alpha@sourceware.org
Subject: Re: [PATCH v2 2/3] locale: Use compat_symbol_reference in _nl_postload_ctype
Date: Wed, 24 Mar 2021 14:11:21 -0300 [thread overview]
Message-ID: <4671a5aa-188c-ccbf-e241-77c758307f55@linaro.org> (raw)
In-Reply-To: <f9855e3eb14d4605ca6625a110011ec022a6bd64.1616184336.git.fweimer@redhat.com>
On 19/03/2021 17:07, Florian Weimer via Libc-alpha wrote:
> These symbol usages are not definitions, so compat_symbol_reference is
> more appropriate than compat_symbol. compat_symbol_reference is also
> safe to emit multiple times (in case the inline assembly is
> duplicated; this is possible because it is nested in a function).
> compat_symbol does not necessarily have this property because it is
> intended to provide a symbol definition.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> locale/lc-ctype.c | 14 ++++++++------
> 1 file changed, 8 insertions(+), 6 deletions(-)
>
> diff --git a/locale/lc-ctype.c b/locale/lc-ctype.c
> index 1db0605c82..7c97480cbd 100644
> --- a/locale/lc-ctype.c
> +++ b/locale/lc-ctype.c
> @@ -93,12 +93,14 @@ _nl_postload_ctype (void)
> We need those relocations so that a versioned definition with a COPY
> reloc in an executable will override the libc.so definition. */
>
> -compat_symbol (libc, __ctype_b, __ctype_b, GLIBC_2_0);
> -compat_symbol (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
> -compat_symbol (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
> -compat_symbol (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
> -compat_symbol (libc, __ctype32_tolower, __ctype32_tolower, GLIBC_2_2);
> -compat_symbol (libc, __ctype32_toupper, __ctype32_toupper, GLIBC_2_2);
> +compat_symbol_reference (libc, __ctype_b, __ctype_b, GLIBC_2_0);
> +compat_symbol_reference (libc, __ctype_tolower, __ctype_tolower, GLIBC_2_0);
> +compat_symbol_reference (libc, __ctype_toupper, __ctype_toupper, GLIBC_2_0);
> +compat_symbol_reference (libc, __ctype32_b, __ctype32_b, GLIBC_2_0);
> +compat_symbol_reference (libc, __ctype32_tolower, __ctype32_tolower,
> + GLIBC_2_2);
> +compat_symbol_reference (libc, __ctype32_toupper, __ctype32_toupper,
> + GLIBC_2_2);
>
> __ctype_b = current (uint16_t, CLASS, 128);
> __ctype_toupper = current (int32_t, TOUPPER, 128);
>
next prev parent reply other threads:[~2021-03-24 17:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-19 20:07 [PATCH v2 0/3] Transparent support for multiple symbol versions Florian Weimer
2021-03-19 20:07 ` [PATCH v2 1/3] Change how the symbol_version_reference macro is defined Florian Weimer
2021-03-19 20:07 ` [PATCH v2 2/3] locale: Use compat_symbol_reference in _nl_postload_ctype Florian Weimer
2021-03-24 17:11 ` Adhemerval Zanella [this message]
2021-03-19 20:07 ` [PATCH v2 3/3] Fold compat_symbol_unique functionality into compat_symbol Florian Weimer
2021-03-24 17:18 ` Adhemerval Zanella
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=4671a5aa-188c-ccbf-e241-77c758307f55@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
/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).