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

--- 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 <h...@sourceware.org>:

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

commit ccf20d460f73c48f3334e1401558df342c77ac8a
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Fri May 1 10:11:06 2020 -0700

    gold: x86-64: Fix TLSDESC relaxation for x32

    X32 TLSDESC sequences can be:

    40 8d 05 00 00 00 00    rex lea foo@TLSDESC(%rip), %reg
    ...
    67 ff 10                call    *foo@TLSCALL(%eax)

    or the same sequence as LP64:

    48 8d 05 00 00 00 00    lea     foo@TLSDESC(%rip), %reg
    ...
    ff 10                   call    *foo@TLSCALL(%rax)

    We need to support both sequences for x32.  For both GDesc -> IE/LE
    transitions,

    67 ff 10                call    *foo@TLSCALL(%eax)

    should relaxed to

    0f 1f 00                nopl    (%rax)

    For GDesc -> LE transition,

    40 8d 05 00 00 00 00    rex lea foo@TLSDESC(%rip), %reg

    should relaxed to

    40 c7 c0 fc ff ff ff    rex movl $foo@tpoff, %reg

    For GDesc -> IE transition,

    40 8d 05 00 00 00 00    rex lea foo@TLSDESC(%rip), %reg

    should relaxed to

    40 8b 05 00 00 00 00    rex movl foo@gottpoff(%rip), %eax

            PR gold/25426
            * x86_64.cc (Target_x86_64<size>::Relocate::tls_desc_gd_to_ie):
            For x32, relax "rex leal foo@tlsdesc(%rip), %reg" to
            "rex movl foo@gottpoff(%rip), %eax" and relax ""call *(%eax)"
            to "nopl (%rax)".
            (Target_x86_64<size>::Relocate::tls_desc_gd_to_le): For x32,
            relax "rex leal foo@tlsdesc(%rip), %reg" to
            "rex movl foo@tpoff, %eax" and relax "call *foo@tlscall(%eax)"
            to "nopl (%rax)".
            * testsuite/Makefile.am (tls_test_gnu2.o): Depend on
            gcctestdir/as.
            (tls_test_file2_gnu2.o): Likewise.
            (tls_test_c_gnu2.o): Likewise.
            * testsuite/Makefile.in: Regenerated.

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

Reply via email to