[PATCH 1/4] x86: Initialize CPU info via IFUNC relocation [BZ 26203]

Florian Weimer fweimer@redhat.com
Mon Sep 28 14:47:30 GMT 2020


* H. J. Lu:

> On Mon, Sep 28, 2020 at 7:22 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * H. J. Lu:
>>
>> > We want to call init_cacheinfo as early as possible.  __libc_early_init is
>> > still too late.
>>
>> My point is that we should call it from IFUNC resolvers that need it,
>> and from __libc_early_init.  That should cover all cases, no?
>
> Why call it from __libc_early_init after it has been called by
> IFUNC reloc?  IFUNC relocations are processed before
> __libc_early_init is called.

IFUNC relocations might not existing in a --disable-multi-arch build,
but it may still need the cacheinfo data if the hard-coded
implementations need them.

We would still run the IFUNC resolver for the artificial IFUNC resolver
with its function pointer, but:

My concern is that you seem to have a specific ordering dependency on
IFUNC resolvers, and I would like to get rid of that: Initialize the
necessary data on demand (for string function selection), and during
__libc_early_init for potential use from string functions.

I hope this clarifies what I'm looking for.  Please let me know if this
is not reasonable.

Thanks,
Florian
-- 
Red Hat GmbH, https://de.redhat.com/ , Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Brian Klemm, Laurie Krebs, Michael O'Neill



More information about the Libc-alpha mailing list