This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv2] Fix float128 IFUNC relocations on ppc64le [BZ #21707]
- From: Nix <nix at esperi dot org dot uk>
- To: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org, fweimer at redhat dot com, carlos at redhat dot com, joseph at codesourcery dot com, gftg at linux dot vnet dot ibm dot com
- Date: Sun, 09 Jul 2017 17:28:32 +0100
- Subject: Re: [PATCHv2] Fix float128 IFUNC relocations on ppc64le [BZ #21707]
- Authentication-results: sourceware.org; auth=none
- References: <6cc4b956-0a60-73af-ea6b-08c11cbc2267@redhat.com> <20170708183113.28695-1-tuliom@linux.vnet.ibm.com>
On 8 Jul 2017, Tulio Magno Quites Machado Filho said this:
> diff --git a/csu/libc-start.c b/csu/libc-start.c
> index c2dd159..84b7f99 100644
> --- a/csu/libc-start.c
> +++ b/csu/libc-start.c
> @@ -188,12 +188,15 @@ LIBC_START_MAIN (int (*main) (int, char **, char ** MAIN_AUXVEC_DECL),
>
> ARCH_INIT_CPU_FEATURES ();
>
> - /* Perform IREL{,A} relocations. */
> - apply_irel ();
> -
> /* The stack guard goes into the TCB, so initialize it early. */
> __libc_setup_tls ();
>
> + /* Perform IREL{,A} relocations.
> + Note: the relocations must happen after TLS initialization so that
> + IFUNC resolvers can benefit from thread-local storage, e.g. powerpc's
> + hwcap and platform fields available in the TCB. */
> + apply_irel ();
> +
> /* Set up the stack checker's canary. */
> uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (_dl_random);
> # ifdef THREAD_SET_STACK_GUARD
Note: I originally moved this above __libc_setup_tls() so that IFUNCs
could be stack-protected on statically-linked applications, but
subsequently found that this caused trouble with dynamically-linked
programs, so ended up de-protecting all the IFUNC resolvers anyway.
(See commit 003a27e8195470f470f4d9384ca70d4e9fc8bd1b.)
If this passes make check with --enable-stack-protector=all, I'm happy
with it.
--
NULL && (void)