libdl: Constify TLS offset table

This commit is contained in:
Sebastian Huber
2024-07-20 01:31:57 +00:00
committed by Amar Takhar
parent b21abd3fa5
commit 7333afe0ae
4 changed files with 23 additions and 23 deletions
+5 -5
View File
@@ -120,11 +120,11 @@ void rtems_rtl_symbol_table_close (rtems_rtl_symbols* symbols);
* @param tls_offsets The TLS offsets table. If NULL none provided.
* @param tls_size The number TLS offset entries in the table.
*/
bool rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,
unsigned int size,
rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size);
bool rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,
unsigned int size,
const rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size);
/**
* Find a symbol given the symbol label in the global symbol table.
+4 -4
View File
@@ -396,10 +396,10 @@ bool rtems_rtl_path_prepend (const char* path);
* @param tls_offsets The TLS offsets table. If NULL none provided.
* @param tls_size The number TLS offset entries in the table.
*/
void rtems_rtl_base_sym_global_add (const unsigned char* esyms,
unsigned int count,
rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size);
void rtems_rtl_base_sym_global_add (const unsigned char* esyms,
unsigned int count,
const rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size);
/**
* Return the object file descriptor for the base image. The object file
+10 -10
View File
@@ -77,10 +77,10 @@ rtems_rtl_symbol_global_insert (rtems_rtl_symbols* symbols,
&symbol->node);
}
static rtems_rtl_tls_offset*
rtems_rtl_symbol_find_tls_offset (size_t index,
rtems_rtl_tls_offset* tls_offsets,
size_t tls_size)
static const rtems_rtl_tls_offset*
rtems_rtl_symbol_find_tls_offset (size_t index,
const rtems_rtl_tls_offset* tls_offsets,
size_t tls_size)
{
size_t entry;
for (entry = 0; entry < tls_size; ++entry)
@@ -119,11 +119,11 @@ rtems_rtl_symbol_table_close (rtems_rtl_symbols* symbols)
}
bool
rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,
unsigned int size,
rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size)
rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
const unsigned char* esyms,
unsigned int size,
const rtems_rtl_tls_offset* tls_offsets,
unsigned int tls_size)
{
rtems_rtl_symbols* symbols;
rtems_rtl_obj_sym* sym;
@@ -194,7 +194,7 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj* obj,
uint8_t data[sizeof (void*)];
void* voidp;
} copy_voidp;
rtems_rtl_tls_offset* tls_off;
const rtems_rtl_tls_offset* tls_off;
int b;
sym->name = (const char*) &esyms[s];
+4 -4
View File
@@ -857,10 +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_tls_offset* tls_offsets,
unsigned int tls_size)
rtems_rtl_base_sym_global_add (const unsigned char* esyms,
unsigned int size,
const 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);