[PATCH] x86-64: Implement strcpy family IFUNC selectors in C
Florian Weimer
fweimer@redhat.com
Mon Jun 12 13:04:00 GMT 2017
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
More information about the Libc-alpha
mailing list