This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] x86-64: Implement strcpy family IFUNC selectors in C
- From: Florian Weimer <fweimer at redhat dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>, Florian Weimer <fweimer at gapps dot redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Mon, 12 Jun 2017 15:04:24 +0200
- Subject: Re: [PATCH] x86-64: Implement strcpy family IFUNC selectors in C
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EF92C80F8E
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EF92C80F8E
- References: <20170611135042.GA22931@gmail.com> <c9e0c022-5cd7-ca7c-6b4e-927b1629ee57@gapps.redhat.com> <CAMe9rOq7hnGXn_EsashoAJwFt9K6OdOzn0gyS9o1St8ZJmJaCA@mail.gmail.com> <CAMe9rOr_f=dC1HNvYhTaOQE7yj6jCPhH3DTBLi4CmYKcdN++yA@mail.gmail.com>
On 06/12/2017 01:33 AM, H.J. Lu wrote:
> diff --git a/sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h b/sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h
> new file mode 100644
> index 0000000..5e7c47d
> --- /dev/null
> +++ b/sysdeps/x86_64/multiarch/ifunc-unaligned-ssse3.h
I think we usually call such files *-skeleton.c these days, but I don't
have a strong preference.
> +++ b/sysdeps/x86_64/multiarch/stpcpy-sse2.S
> +# undef weak_alias
> +# define weak_alias(__stpcpy, stpcpy)
> +# undef libc_hidden_def
> +# define libc_hidden_def(__stpcpy)
> +# undef libc_hidden_builtin_def
> +# define libc_hidden_builtin_def(stpcpy)
I find this quite confusing. Maybe use
#define weak_alias(ignored1, ignored2)
instead? (And I'd really prefer this kind of preprocessor hackery
wouldn't be necessary.
> +++ b/sysdeps/x86_64/multiarch/stpcpy.c
> +weak_alias (__stpcpy, stpcpy)
> +__hidden_ver1 (__stpcpy, __GI___stpcpy, __redirect___stpcpy)
> + __attribute__((visibility ("hidden")));
> +__hidden_ver1 (stpcpy, __GI_stpcpy, __redirect_stpcpy)
> + __attribute__((visibility ("hidden")));
Missing space before parenthesis (after __attribute__). This occurs
five times in the patch.
Thanks,
Florian