[Top][All Lists]

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

[Bug ld/22263] -fpie -pie generates dynamic relocations in text section

From: cvs-commit at gcc dot gnu.org
Subject: [Bug ld/22263] -fpie -pie generates dynamic relocations in text section
Date: Thu, 25 Jan 2018 11:21:17 +0000


--- Comment #12 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot 
gnu.org> ---
The master branch has been updated by Eric Botcazou <address@hidden>:


commit bb363086e7743506d78bc6b1e56face0fb1fc93f
Author: Eric Botcazou <address@hidden>
Date:   Thu Jan 25 12:16:06 2018 +0100

    Fix PR ld/22727 (TLS breakage in PIC/PIE mode on SPARC).

    There are actually 2 different bugs:
     1. TLS transition is broken in PIE mode.
     2. TLS is broken in PIC/PIE mode when the __tls_get_addr symbol
        is versioned  (as is the case on Linux and Solaris at least).

    The 1st bug is fixed by reverting the problematic change for now
    (note that the associated test doesn't pass on SPARC because of another
    issue so there is  no formal regression in the testsuite). The 2nd bug
    is fixed by changing the  call to _bfd_generic_link_add_one_symbol
    on __tls_get_addr into a mere lookup in _bfd_sparc_elf_check_relocs.

        * elfxx-sparc.c (_bfd_sparc_elf_check_relocs) <R_SPARC_TLS_GD_CALL>:
        Do a mere lookup of the __tls_get_addr symbol instead of adding it.

        2017-10-19  H.J. Lu  <address@hidden>

        PR ld/22263
        * elfxx-sparc.c (sparc_elf_tls_transition): Replace
        bfd_link_pic with !bfd_link_executable, !bfd_link_pic with
        bfd_link_executable for TLS check.
        (_bfd_sparc_elf_check_relocs): Likewise.
        (allocate_dynrelocs): Likewise.
        (_bfd_sparc_elf_relocate_section): Likewise.
        * testsuite/ld-sparc/sparc.exp (32-bit: Helper shared library):
        Link with a version script.
        (32-bit: TLS -fpie): New test.
        (64-bit: Helper shared library): Link with a version script.
        (64-bit: TLS -fpie): New test.
        (64-bit: GOTDATA relocations): Pass -Av9 to the assembler.
        * testsuite/ld-sparc/tlslib.ver: New file.
        * testsuite/ld-sparc/tlspie32.dd: Likewise.
        * testsuite/ld-sparc/tlspie32.s: Likewise.
        * testsuite/ld-sparc/tlspie64.dd: Likewise.
        * testsuite/ld-sparc/tlspie64.s: Likewise.
        * testsuite/ld-sparc/tlssunbin32.dd: Adjust for versioned symbol.
        * testsuite/ld-sparc/tlssunbin32.rd: Likewise.
        * testsuite/ld-sparc/tlssunbin32.sd: Likewise.
        * testsuite/ld-sparc/tlssunbin64.dd: Likewise.
        * testsuite/ld-sparc/tlssunbin64.rd: Likewise.
        * testsuite/ld-sparc/tlssunbin64.sd: 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]