https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106581

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
          Component|libstdc++                   |target

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Lance Fredrickson from comment #10)
> (gdb) disassemble 0x7fb7eae3b8
> Dump of assembler code for function (anonymous namespace)::get_global():
>    0x0000007fb7eae3b8 <+0>:     stp     x29, x30, [sp, #-16]!
>    0x0000007fb7eae3bc <+4>:     mov     x29, sp
>    0x0000007fb7eae3c0 <+8>:     adrp    x0, 0x7fb7fe3000
> <_znst15basic_stringbuficst11char_traitsicesaicee15_m_update_egpt...@got.plt>
>    0x0000007fb7eae3c4 <+12>:    ldr     x1, [x0, #3248]
>    0x0000007fb7eae3c8 <+16>:    add     x0, x0, #0xcb0
>    0x0000007fb7eae3cc <+20>:    blr     x1
>    0x0000007fb7eae3d0 <+24>:    mrs     x1, tpidr_el0
>    0x0000007fb7eae3d4 <+28>:    add     x0, x1, x0
>    0x0000007fb7eae3d8 <+32>:    ldp     x29, x30, [sp], #16
>    0x0000007fb7eae3dc <+36>:    ret
> End of assembler dump.

That looks correct.
It is basically:

        adrp    x0, :tlsdesc:a
        ldr     x1, [x0, #:tlsdesc_lo12:a]
        add     x0, x0, :tlsdesc_lo12:a
        .tlsdesccall    a
        blr     x1
        mrs     x1, tpidr_el0
        add     x0, x1, x0


So now this is looking more and more like an uclibc issue rather a
GCC/libstdc++ one.
Have you reported it to them yet?

Reply via email to