This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC] Fix float128 IFUNC relocations on ppc64le [BZ #21707]
- From: Florian Weimer <fweimer at redhat dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>, libc-alpha at sourceware dot org
- Cc: bergner at vnet dot ibm dot com, joseph at codesourcery dot com, gftg at linux dot vnet dot ibm dot com
- Date: Wed, 5 Jul 2017 21:19:25 +0200
- Subject: Re: [RFC] Fix float128 IFUNC relocations on ppc64le [BZ #21707]
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 17E3580F95
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 17E3580F95
- References: <60e4bbfd-186a-e98d-1322-1a4678fcb000@redhat.com> <20170705172315.14358-1-tuliom@linux.vnet.ibm.com>
On 07/05/2017 07:23 PM, Tulio Magno Quites Machado Filho wrote:
> 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 ();
> +
__libc_setup_tls calls memcpy and a lot of other stuff, so I'm not sure
if this change is correct on all architectures.
> +# libgcc requires __tcb_parse_hwcap_and_convert_at_platform when built with
> +# a binary128 type. That symbol is provided by the loader on dynamically
> +# linked executables, forcing to link the loader after libgcc link.
> +f128-loader-link = $(as-needed) $(elf-objpfx)ld.so $(no-as-needed)
Why doesn't the regular linker invocation take care of this? Will user
applications run into the same issue?
Thanks,
Florian