[RFC] Fix float128 IFUNC relocations on ppc64le [BZ #21707]
Florian Weimer
fweimer@redhat.com
Wed Jul 5 19:19:00 GMT 2017
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
More information about the Libc-alpha
mailing list