http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58595

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32252
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32252&action=edit
gcc49-pr58595.patch

Untested fix.  While the testcase does compile with -O2 -fpic -fno-gcse, I
don't see how it could work,
        ldr     r3, .L5
        ldr     r2, .L5+4
.LPIC0:
        add     r3, pc, r3
        ldr     r4, [r3, r2]
        add     r4, r4, #4
...
.L5:
        .word   _GLOBAL_OFFSET_TABLE_-(.LPIC0+8)
        .word   s(GOT)
simply can't load correct TLS symbol s value when s is in .tbss.

This untested patch does roughly what i386.c does, call legitimize_tls_address
even when we see a constant addition to a TLS SYMBOL_REF.

Reply via email to