libdl: Add support to import base image TLS symbols

This change requires an rtems-tools update for symbol generation.

Working architectures:
 - aarch64
 - arm
 - powerpc
 - sparc

No newlib TLS support but checked:
 - i386
 - m69k

Updates #4920
This commit is contained in:
Chris Johns
2023-06-08 13:52:47 +10:00
parent 723c096d57
commit 27da374e48
13 changed files with 422 additions and 60 deletions

View File

@@ -857,8 +857,10 @@ rtems_rtl_path_prepend (const char* path)
}
void
rtems_rtl_base_sym_global_add (const unsigned char* esyms,
unsigned int size)
rtems_rtl_base_sym_global_add (const unsigned char* esyms,
unsigned int size,
rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size)
{
if (rtems_rtl_trace (RTEMS_RTL_TRACE_GLOBAL_SYM))
printf ("rtl: adding global symbols, table size %u\n", size);
@@ -869,7 +871,7 @@ rtems_rtl_base_sym_global_add (const unsigned char* esyms,
return;
}
rtems_rtl_symbol_global_add (rtl->base, esyms, size);
rtems_rtl_symbol_global_add (rtl->base, esyms, size, tls_offsets, tls_size);
rtems_rtl_unlock ();
}