This is the mail archive of the glibc-bugs@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]

[Bug dynamic-link/21609] Incomplete workaround for GCC __tls_get_addr ABI issue on x86-64


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

--- Comment #2 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, hjl/pr21609/master has been created
        at  58b6dc823b3c400b2923dd4e5fd62246a67fa3ab (commit)

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

commit 58b6dc823b3c400b2923dd4e5fd62246a67fa3ab
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jul 4 07:17:49 2017 -0700

    Updated

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0c239bea066f5433cec17f0524c29ca21e8fb4cc

commit 0c239bea066f5433cec17f0524c29ca21e8fb4cc
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jul 4 07:03:13 2017 -0700

    x86-64: Align the stack in __tls_get_addr [BZ #21609]

    This change forces realignment of the stack pointer in __tls_get_addr, so
    that binaries compiled by GCCs older than GCC 4.9:

    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58066

    continue to work even if vector instructions are used in glibc which
    require the ABI stack realignment.

    __tls_get_addr_slow is added to handle the slow paths in the default
    implementation of__tls_get_addr in elf/dl-tls.c.  The new __tls_get_addr
    calls __tls_get_addr_slow after realigning the stack.

    2017-07-03  Florian Weimer  <fweimer@redhat.com>
            H.J. Lu  <hongjiu.lu@intel.com>

        [BZ #21609]
        * sysdeps/x86_64/Makefile (sysdep-dl-routines): Add tls_get_addr.
        (gen-as-const-headers): Add rtld-offsets.sym.
        * sysdeps/x86_64/dl-tls.c: New file.
        * sysdeps/x86_64/rtld-offsets.sym: Likwise.
        * sysdeps/x86_64/tls_get_addr.S: Likewise.
        * sysdeps/x86_64/dl-tls.h: Add multiple inclusion guards.
        * sysdeps/x86_64/tlsdesc.sym (TI_MODULE_OFFSET): New.
        (TI_OFFSET_OFFSET): Likwise.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f53c479a3847accbd48aaaa4b39346e07d7a6cf4

commit f53c479a3847accbd48aaaa4b39346e07d7a6cf4
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Tue Jul 4 05:51:55 2017 -0700

    x86-64: Align the stack in __tls_get_addr [BZ #21609]

    This change forces realignment of the stack pointer in __tls_get_addr, so
    that old GCC-compiled binaries continue to work even if vector instructions
    are used in glibc which require the ABI stack realignment.

    The implementation of __tls_get_addr calls the default implementation
    (from elf/dl-tls.c, now calls __tls_get_addr_default) after realigning
    the stack.  Internal calls go directly to __tls_get_addr_default because
    they do not need stack realignment.

    2017-07-03  Florian Weimer  <fweimer@redhat.com>
            H.J. Lu  <hongjiu.lu@intel.com>

        [BZ #21609]
        * sysdeps/x86_64/Makefile (sysdep-dl-routines): Add tls_get_addr.
        (CFLAGS-tls_get_addr.c): New.
        * sysdeps/x86_64/dl-tls.c: New file.
        * sysdeps/x86_64/tls_get_addr.c: Likewise.
        * sysdeps/x86_64/dl-tls.h: Add multiple inclusion guards.

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7bd9f666244ca837f443bff8b45dd4783a676d32

commit 7bd9f666244ca837f443bff8b45dd4783a676d32
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jul 3 13:16:57 2017 -0700

    x86-64: Align the stack in __tls_get_addr [BZ #21609]

    This change forces realignment of the stack pointer in __tls_get_addr, so
    that old GCC-compiled binaries continue to work even if vector instructions
    are used in glibc which require the ABI stack realignment.

    The implementation of __tls_get_addr calls the default implementation
    (from elf/dl-tls.c, now calls __tls_get_addr_default) after realigning
    the stack.  Internal calls go directly to __tls_get_addr_default because
    they do not need stack realignment.

    2017-07-03  Florian Weimer  <fweimer@redhat.com>
            H.J. Lu  <hongjiu.lu@intel.com>

        [BZ #21609]
        * sysdeps/x86_64/dl-tls.c: New file.
        * sysdeps/x86_64/dl-tls.h: Add multiple inclusion guards.

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

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

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