[PATCH] Add wcharP.h to hide internal wchar functions [BZ #18822]
Florian Weimer
fweimer@redhat.com
Mon Dec 11 13:55:00 GMT 2017
On 11/25/2017 01:13 AM, H.J. Lu wrote:
> diff --git a/sysdeps/generic/wcharP.h b/sysdeps/generic/wcharP.h
> new file mode 100644
> index 0000000000..1a37283bf1
> --- /dev/null
> +++ b/sysdeps/generic/wcharP.h
> @@ -0,0 +1,18 @@
> +/* Internal prototrypes for multibyte and wide character functions.
Typo (in all files).
I think this is architecturally wrong.
We should enhance the toolchain to do this kind of optimization
automatically (maybe using LTO?). Or find another way to implement the
markup in a more centralized fashion, so that once you define an IFUNC
resolver, the necessary arrangements to avoid a direct call are
performed automatically.
In any case, these files need documentation what exactly you are trying
to do. The wcharP.h name does not match existing usage of *P.h headers.
The intent here seems to be not to add any new declarations to
wcharP.h, only optimize existing declarations.
It's also not clear why you need to replicate ___atribute_pure__ in
those declarations.
Thanks,
Florian
More information about the Libc-alpha
mailing list