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 #7 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, release/2.25/master has been updated
       via  49f97e641e4e84a42246655d30adbc4756e67114 (commit)
      from  adc7e06fb412a2a1ee52f8cb788caf436335b9f3 (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=49f97e641e4e84a42246655d30adbc4756e67114

commit 49f97e641e4e84a42246655d30adbc4756e67114
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jul 6 04:43:06 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.  Internal calls
    within ld.so go directly to the default implementation of __tls_get_addr
    because they do not need stack realignment.

        [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.

    (cherry picked from commit 031e519c95c069abe4e4c7c59e2b4b67efccdee5)

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

Summary of changes:
 ChangeLog                       |   13 ++++++++
 sysdeps/x86_64/Makefile         |    4 +-
 sysdeps/x86_64/dl-tls.c         |   53 +++++++++++++++++++++++++++++++++
 sysdeps/x86_64/dl-tls.h         |    5 +++
 sysdeps/x86_64/rtld-offsets.sym |    6 ++++
 sysdeps/x86_64/tls_get_addr.S   |   61 +++++++++++++++++++++++++++++++++++++++
 sysdeps/x86_64/tlsdesc.sym      |    3 ++
 7 files changed, 143 insertions(+), 2 deletions(-)
 create mode 100644 sysdeps/x86_64/dl-tls.c
 create mode 100644 sysdeps/x86_64/rtld-offsets.sym
 create mode 100644 sysdeps/x86_64/tls_get_addr.S

-- 
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]