V4 [PATCH] x86: Initialize CPU info via IFUNC relocation [BZ 26203]
H.J. Lu
hjl.tools@gmail.com
Thu Oct 1 19:50:01 GMT 2020
On Thu, Oct 1, 2020 at 1:46 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c
> > index dadec5d58f..65ab29123d 100644
> > --- a/sysdeps/x86/cacheinfo.c
> > +++ b/sysdeps/x86/cacheinfo.c
> > @@ -16,7 +16,9 @@
> > License along with the GNU C Library; if not, see
> > <https://www.gnu.org/licenses/>. */
> >
> > -#if IS_IN (libc)
> > +/* NB: In libc.a, this file is included in libc-static.c. In libc.so,
> > + this file is standalone. */
> > +#if IS_IN (libc) && (defined SHARED || defined _PRIVATE_CPU_FEATURES_H)
>
> libc-static.c should be libc-start.c, I believe. The “defined
> _PRIVATE_CPU_FEATURES_H” part seems rather indirect. What exactly are
> you trying to accomplish here?
>
> It looks to me as if this file should included in libc.so, but not
> pulled into ld.so via the rebuild, so maybe you can add an empty
> sysdeps/x86/rtld-cacheinfo.c file instead?
>
Here is the updated patch. I also moved files around to prepare
for moving x86 processor cache info to cpu_features in ld.so to
support --list-tunables.
--
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-x86-Initialize-CPU-info-via-IFUNC-relocation-BZ-2620.patch
Type: text/x-patch
Size: 65027 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20201001/6a2fba0a/attachment-0001.bin>
More information about the Libc-alpha
mailing list