[Bug math/21707] ppc64le: Invalid IFUNC resolver from libgcc calls getauxval, leading to relocation crash

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Mon Jul 17 20:51:00 GMT 2017


https://sourceware.org/bugzilla/show_bug.cgi?id=21707

--- Comment #5 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  91ac3a7d8474480685632cd25f844d3154c69fdf (commit)
      from  ae5c498d93d049d9574d3f8f18e62cac64cbdf5c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=91ac3a7d8474480685632cd25f844d3154c69fdf

commit 91ac3a7d8474480685632cd25f844d3154c69fdf
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Mon Jul 17 17:48:59 2017 -0300

    powerpc: Fix float128 IFUNC relocations [BZ #21707]

    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

        [BZ #21707]
        * csu/libc-start.c (LIBC_START_MAIN): Perform IREL{,A}
        relocations before or after initializing the TCB on statically
        linked executables.  That's a per-architecture definition.
        * elf/rtld.c (dl_main): Add a comment about thread-local
        variables initialization.
        * sysdeps/generic/libc-start.h: New file.  Define
        ARCH_APPLY_IREL and ARCH_SETUP_IREL.
        * 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.h: New file.  Define
        ARCH_APPLY_IREL and ARCH_SETUP_IREL.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                    |   27 ++++++
 csu/libc-start.c                             |   11 ++-
 elf/rtld.c                                   |    4 +-
 sysdeps/generic/libc-start.h                 |   30 ++++++
 sysdeps/powerpc/Makefile                     |   10 ++-
 sysdeps/powerpc/powerpc64le/Makefile         |   10 ++
 sysdeps/powerpc/tst-tlsifunc-static.c        |   19 ++++
 sysdeps/powerpc/tst-tlsifunc.c               |  129 ++++++++++++++++++++++++++
 sysdeps/unix/sysv/linux/powerpc/libc-start.h |   29 ++++++
 9 files changed, 265 insertions(+), 4 deletions(-)
 create mode 100644 sysdeps/generic/libc-start.h
 create mode 100644 sysdeps/powerpc/tst-tlsifunc-static.c
 create mode 100644 sysdeps/powerpc/tst-tlsifunc.c
 create mode 100644 sysdeps/unix/sysv/linux/powerpc/libc-start.h

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Glibc-bugs mailing list