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: [PATCHv3] powerpc: Fix float128 IFUNC relocations [BZ #21707]


On Wed, Jul 12, 2017 at 11:59 AM, Tulio Magno Quites Machado Filho
<tuliom@linux.vnet.ibm.com> wrote:
> Changes since version 2:
>
>  - Fixed a typo in the commit message.
>  - Fixed coding style in the test.
>  - Adapted csu/libc-start.c to let IREL relocation happen before or
>    after TLS initialization, depending on the target architecture.
>  - Removed comment from csu/libc-tls.c added in version 1.
>  - Limited the execution of the tests to multi-arch builds.
>  - Moved the tests to sysdeps/powerpc.
>
> Changes since version 1:
>
>  - Added a testcase.  This is now validating both statically and
>    dynamically linked executables.
>  - Fixed an issue in the $(foreach ..) in sysdeps/powerpc/powerpc64le/Makefile.
>  - Added a comment to csu/libc-start.c
>  - Added a comment to csu/libc-tls.c
>
> -- 8< --
>
> The patch proposed by Peter Bergner [1] to libgcc in order to fix
> [BZ #21707] adds a dependency on a symbol provided by the loader,
> forcing the loader to be linked to tests after libgcc was linked.
>
> It also requires to read the thread pointer during IRELA relocations.
>
> Tested on powerpc, powerpc64, powerpc64le, s390x and x86_64.
>
> [1] https://sourceware.org/ml/libc-alpha/2017-06/msg01383.html
>
> 2017-07-12  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
>
>         [BZ #21707]
>         * csu/libc-start.c (ARCH_APPLY_IREL, ARCH_SETUP_IREL): New macros.
>         (LIBC_START_MAIN): Perform IREL{,A} relocations before or after
>         initializing the TCB on statically linked executables.  That's a
>         per-architecture definition.
>         * sysdeps/powerpc/Makefile:
>         [$(subdir) = elf && $(multi-arch) != no] (tests-static-internal): Add tst-tlsifunc-static.
>         [$(subdir) = elf && $(multi-arch) != no && $(build-shared) == yes]
>         (tests-internal): Add tst-tlsifunc.
>         * sysdeps/powerpc/tst-tlsifunc.c: New file.
>         * sysdeps/powerpc/tst-tlsifunc-static.c: Likewise.
>         * sysdeps/powerpc/powerpc64le/Makefile (f128-loader-link): New
>         variable.
>         [$(subdir) = math] (test-float128% test-ifloat128%): Force
>         linking to the loader after linking to libgcc.
>         [$(subdir) = wcsmbs || $(subdir) = stdlib] (bug-strtod bug-strtod2)
>         (bug-strtod2 tst-strtod-round tst-wcstod-round tst-strtod6 tst-strrom)
>         (tst-strfrom-locale strfrom-skeleton): Likewise.
>         * sysdeps/unix/sysv/linux/powerpc/libc-start.c [!SHARED]: Define
>         ARCH_APPLY_IREL().
>

It works in x86-64.

Thanks.

-- 
H.J.


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