mazen Adel commented on a discussion on cpukit/libdl/rtl.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/679#note_129369 > +rtems_rtl_obj_find_symbol_by_addr (const rtems_rtl_obj* obj, const void* > addr) > +{ > + rtems_rtl_obj_sym* best_sym = NULL; > + const void* best_addr = NULL; > + size_t i; > + > + for (i = 0; i < obj->global_syms; ++i) > + { > + rtems_rtl_obj_sym* sym = &obj->global_table[i]; > + > + if (sym->value <= addr) > + { > + if (!best_sym || sym->value > best_addr) > + { > + best_sym = sym; > + best_addr = sym->value; It searches the whole sym table to find the `the symbol that has the largest address less than or equal to the specified address` If it is an exact match it returns. Else it finds the sym that has an address less than `addr` and higher than the current `best_sym`. -- View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/679#note_129369 You're receiving this email because of your account on gitlab.rtems.org.
_______________________________________________ bugs mailing list bugs@rtems.org http://lists.rtems.org/mailman/listinfo/bugs