bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gold/20216] Gold should support x86-64 TLS code sequences without P


From: cvs-commit at gcc dot gnu.org
Subject: [Bug gold/20216] Gold should support x86-64 TLS code sequences without PLT
Date: Wed, 29 Jun 2016 15:39:53 +0000

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

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by H.J. Lu <address@hidden>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ad961eab9a010e79d17a4ea7e6bb977fe6dd86c2

commit ad961eab9a010e79d17a4ea7e6bb977fe6dd86c2
Author: H.J. Lu <address@hidden>
Date:   Wed Jun 29 08:37:30 2016 -0700

    gold: Support x86-64 TLS code sequences without PLT

    There are extensions to x86-64 psABI:

    https://groups.google.com/forum/#!topic/x86-64-abi/de5_KnLHxtI

    to call tls_get_addr via GOT:

    call address@hidden(%rip)

    Since direct call is 4-byte long and indirect call, is 5-byte long, the
    extra one byte must be handled properly.

    For general dynamic model, one 0x66 prefix before call instruction is
    removed to make room for indirect call.  For local dynamic model, we
    simply use 5-byte indirect call.

    TLS linker optimization is updated to recognize new instruction
    patterns.  For local dynamic model to local exec model transition, we
    generate 4 0x66 prefixes, instead of 3, before mov instruction in 64-bit
    and generate a 5-byte nop, instead of 4-byte, before mov instruction in
    32-bit.

        PR gold/20216
        * configure.ac (DEFAULT_TARGET_X86_64_OR_X32): New
        AM_CONDITIONAL.
        * configure: Regenerated.
        * x86_64.cc (Target_x86_64<size>::Relocate::relocate): Allow
        R_X86_64_GOTPCRELX relocation against __tls_get_addr.
        (Target_x86_64<size>::Relocate::tls_gd_to_ie): Support indirect
        call to __tls_get_addr.
        (Target_x86_64<size>::Relocate::tls_gd_to_le): Likewise.
        (Target_x86_64<size>::Relocate::tls_ld_to_le): Likewise.
        * testsuite/Makefile.am (check_PROGRAMS): Add pr20216a_test,
        pr20216b_test, pr20216c_test, pr20216d_test, pr20216e_test.
        (pr20216a_test_SOURCES): New.
        (pr20216a_test_DEPENDENCIES): Likewise.
        (pr20216a_test_CFLAGS): Likewise.
        (pr20216a_test_LDFLAGS): Likewise.
        (pr20216a_test_LDADD): Likewise.
        (pr20216b_test_SOURCES): Likewise.
        (pr20216b_test_DEPENDENCIES): Likewise.
        (pr20216b_test_CFLAGS): Likewise.
        (pr20216b_test_LDFLAGS): Likewise.
        (pr20216b_test_LDADD): Likewise.
        (pr20216c_test_SOURCES): Likewise.
        (pr20216c_test_DEPENDENCIES): Likewise.
        (pr20216c_test_CFLAGS): Likewise.
        (pr20216c_test_LDFLAGS): Likewise.
        (pr20216c_test_LDADD): Likewise.
        (pr20216d_test_SOURCES): Likewise.
        (pr20216d_test_DEPENDENCIES): Likewise.
        (pr20216d_test_CFLAGS): Likewise.
        (pr20216d_test_LDFLAGS): Likewise.
        (pr20216d_test_LDADD): Likewise.
        (pr20216e_test_SOURCES): Likewise.
        (pr20216e_test_DEPENDENCIES): Likewise.
        (pr20216e_test_CFLAGS): Likewise.
        (pr20216e_test_LDFLAGS): Likewise.
        (pr20216e_test_LDADD): Likewise.
        (pr20216a.so): Likewise.
        (pr20216b.so): Likewise.
        (pr20216_gd.o): Likewise.
        (pr20216_ld.o): Likewise.
        (MOSTLYCLEANFILES): Add pr20216a.so pr20216b.so.
        * testsuite/Makefile.in: Regenerated.
        * testsuite/pr20216_def.c: New file.
        * testsuite/pr20216_gd.S: Likewise.
        * testsuite/pr20216_ld.S: Likewise.
        * testsuite/pr20216_main.c: Likewise.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]