forked from Imagelibrary/rtems
libdl: Do not access the ELF file while the allocator is locked.
- Load symbols before allocation. - Parse reloc records and place any reloc recs in a cache to use while the allocator is locked. - Relocate symbols after section allocation. - Split section loading into allocation/locating and loading. - Update all arch back-ends with a new reloc interface to control tramp handling. - Add `-a` and `-t` to the object list shell command. Closes #3741
This commit is contained in:
@@ -477,21 +477,24 @@ rtems_rtl_find_obj (const char* name)
|
||||
rtems_rtl_obj*
|
||||
rtems_rtl_find_obj_with_symbol (const rtems_rtl_obj_sym* sym)
|
||||
{
|
||||
rtems_chain_node* node = rtems_chain_first (&rtl->objects);
|
||||
while (!rtems_chain_is_tail (&rtl->objects, node))
|
||||
if (sym != NULL)
|
||||
{
|
||||
rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
|
||||
if (rtems_rtl_obj_has_symbol (obj, sym))
|
||||
return obj;
|
||||
node = rtems_chain_next (node);
|
||||
}
|
||||
node = rtems_chain_first (&rtl->pending);
|
||||
while (!rtems_chain_is_tail (&rtl->pending, node))
|
||||
{
|
||||
rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
|
||||
if (rtems_rtl_obj_has_symbol (obj, sym))
|
||||
return obj;
|
||||
node = rtems_chain_next (node);
|
||||
rtems_chain_node* node = rtems_chain_first (&rtl->objects);
|
||||
while (!rtems_chain_is_tail (&rtl->objects, node))
|
||||
{
|
||||
rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
|
||||
if (rtems_rtl_obj_has_symbol (obj, sym))
|
||||
return obj;
|
||||
node = rtems_chain_next (node);
|
||||
}
|
||||
node = rtems_chain_first (&rtl->pending);
|
||||
while (!rtems_chain_is_tail (&rtl->pending, node))
|
||||
{
|
||||
rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
|
||||
if (rtems_rtl_obj_has_symbol (obj, sym))
|
||||
return obj;
|
||||
node = rtems_chain_next (node);
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user