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

--- Comment #3 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The binutils-2_43-branch branch has been updated by H.J. Lu
<h...@sourceware.org>:

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

commit 6f81a3cde4f7da6083dc623a327d61182a40c244
Author: H.J. Lu <hjl.to...@gmail.com>
Date:   Tue Jul 23 23:39:50 2024 -0700

    x86: Improve TLS transition error check

    Provide detailed TLS transition errors when unsupported instructions are
    used.  Treat R_X86_64_CODE_4_GOTTPOFF and R_X86_64_CODE_6_GOTTPOFF as
    R_X86_64_GOTTPOFF when performing TLS transition.

    bfd/

            PR ld/32017
            * elf32-i386.c (elf_i386_check_tls_transition): Return different
            enums for different errors.
            (elf_i386_tls_transition): Change argument from r_symndx to sym.
            Call _bfd_x86_elf_link_report_tls_transition_error to report TLS
            transition errors.
            (elf_i386_scan_relocs): Pass isym instead of r_symndx to
            elf_i386_tls_transition.
            (elf_i386_relocate_section): Pass sym instead of r_symndx to
            elf_i386_tls_transition.
            * elf64-x86-64.c (elf_x86_64_check_tls_transition): Return
            different enums for different errors.
            (elf_x86_64_tls_transition): Change argument from r_symndx to sym.
            Treat R_X86_64_CODE_4_GOTTPOFF and R_X86_64_CODE_6_GOTTPOFF as
            R_X86_64_GOTTPOFF.  Call
            _bfd_x86_elf_link_report_tls_transition_error to report TLS
            transition errors.
            (elf_x86_64_scan_relocs): Pass isym instead of r_symndx to
            elf_x86_64_tls_transition.
            (elf_x86_64_relocate_section): Pass sym instead of r_symndx to
            elf_x86_64_tls_transition.
            * elfxx-x86.c (_bfd_x86_elf_link_report_tls_transition_error): New.
            * elfxx-x86.h (elf_x86_tls_error_type): Likewise.
            (_bfd_x86_elf_link_report_tls_transition_error): Likewise.

    ld/

            PR ld/32017
            * testsuite/ld-i386/i386.exp: Run tlsgdesc1 and tlsgdesc2.
            * testsuite/ld-i386/tlsie2.d: Updated.
            * testsuite/ld-i386/tlsie3.d: Likewise.
            * testsuite/ld-i386/tlsie4.d: Likewise.
            * testsuite/ld-i386/tlsie5.d: Likewise.
            * testsuite/ld-x86-64/tlsie2.d: Likewise.
            * testsuite/ld-x86-64/tlsie3.d: Likewise.
            * testsuite/ld-i386/tlsgdesc1.d: New file.
            * testsuite/ld-i386/tlsgdesc1.s: Likewise.
            * testsuite/ld-i386/tlsgdesc2.d: Likewise.
            * testsuite/ld-i386/tlsgdesc2.s: Likewise.
            * testsuite/ld-x86-64/tlsdesc3.d: Likewise.
            * testsuite/ld-x86-64/tlsdesc3.s: Likewise.
            * testsuite/ld-x86-64/tlsdesc4.d: Likewise.
            * testsuite/ld-x86-64/tlsdesc4.s: Likewise.
            * testsuite/ld-x86-64/tlsie5.d: Likewise.
            * testsuite/ld-x86-64/tlsie5.s: Likewise.
            * testsuite/ld-x86-64/x86-64.exp: Run tlsie5, tlsdesc3 and
            tlsdesc4.

    Signed-off-by: H.J. Lu <hjl.to...@gmail.com>
    (cherry picked from commit 1d68a49ac5d71b648304f69af978fce0f4413800)

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

Reply via email to