This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 4/5] Delay initialization of CPU features struct in static binaries


On Thu, May 18, 2017 at 1:07 PM, Siddhesh Poyarekar
<siddhesh@sourceware.org> wrote:
> Allow the CPU features structure set up to be overridden by tunables
> by delaying it to until after tunables are initialized.  The
> initialization is already delayed in dynamically linked glibc, it is
> only in static binaries that the initialization is set early to allow
> it to influence IFUNC relocations that happen in libc-start.  It is a
> bit too early however and there is a good place between tunables
> initialization and IFUNC relocations where this can be done.
>
> Verified that this does not regress the testsuite.
>
>         * csu/libc-start.c [!ARCH_INIT_CPU_FEATURES]: Define
>         ARCH_INIT_CPU_FEATURES.
>         (LIBC_START_MAIN): Call it.
>         * sysdeps/unix/sysv/linux/aarch64/libc-start.c
>         (__libc_start_main): Remove.
>         (ARCH_INIT_CPU_FEATURES): New macro.
>         * sysdeps/x86/libc-start.c (__libc_start_main): Remove.
>         (ARCH_INIT_CPU_FEATURES): New macro.
> ---
>

Looks good to me.

Thanks.

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]