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(-)

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;
   }
 
   /*
-- 
2.30.2

_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to