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

--- Comment #85 from LIU Hao <lh_mouse at 126 dot com> ---
Created attachment 59666
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59666&action=edit
libstdc++ fix

It is not possible to export a `__thread` variable with native TLS, because
it's not possible to access `_tls_used` of a different module.

The linker (GNU LD) shall not export such a symbol. It is exporting an unusable
symbol now, so it's a bug.

libstdc++ shall not export and import `__thread` variables. Attached is a patch
for MCF thread model about a different PR, but I think this is a good
opportunity to fix it forever, as native TLS is a huuuuge ABI break already.

Reply via email to