From 1c6ac88f938f4b135f3bbffc4b19bbc540508c80 Mon Sep 17 00:00:00 2001 From: Ryan Long Date: Tue, 19 Jul 2022 11:34:42 -0500 Subject: cpukit/libdl/rtl-sym.c: Fix increment of variable In rtems_rtl_symbol_global_add() the loop that gets to the end of the symbol table used "unsigned long" to increment the index for the table. For most architectures this resulted in 4, but with AArch64, it results in 8. This resulted in the symbols being read in wrong. Changing this to void* along with changing the RISC-V specific code for 8 byte pointers in rtems-tools to work independent of the architecture. Updates #4673 Closes #4682 --- cpukit/libdl/rtl-sym.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cpukit/libdl') diff --git a/cpukit/libdl/rtl-sym.c b/cpukit/libdl/rtl-sym.c index c29c8c49d6..5c9c3981df 100644 --- a/cpukit/libdl/rtl-sym.c +++ b/cpukit/libdl/rtl-sym.c @@ -124,7 +124,7 @@ rtems_rtl_symbol_global_add (rtems_rtl_obj* obj, return false; } ++count; - s += l + sizeof (unsigned long) + 1; + s += l + sizeof (void *) + 1; } /* -- cgit v1.2.3