--- linkers/rtems-syms.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/linkers/rtems-syms.cpp b/linkers/rtems-syms.cpp index f0ac2bb..9fe552e 100644 --- a/linkers/rtems-syms.cpp +++ b/linkers/rtems-syms.cpp @@ -322,9 +322,9 @@ output_sym::operator ()(const rld::symbols::symtab::value_type& value) if (sym.type () == STT_TLS) { c.write_line ("#define RTEMS_TLS_INDEX_" + sym.name () + " " + std::to_string(index)); c.write_line ("static size_t rtems_rtl_tls_" + sym.name () + "(void) {"); - c.write_line (" extern __thread void* " + sym.name () + ";"); - c.write_line (" const void* tls_base = rtems_rtl_tls_get_base ();"); - c.write_line (" const void* tls_addr = (void*) &" + sym.name () + ";"); + c.write_line (" extern __thread char " + sym.name () + "[];"); + c.write_line (" size_t tls_base = (size_t) rtems_rtl_tls_get_base ();"); + c.write_line (" size_t tls_addr = (size_t) " + sym.name () + ";"); c.write_line (" return tls_addr - tls_base;"); c.write_line ("}"); c.write_line (""); -- 2.35.3 _______________________________________________ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel