Changeset b36c5209 in rtems for cpukit/libdl/rtl.c


Ignore:
Timestamp:
May 3, 2019, 12:15:20 AM (7 weeks ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
8bd4f61c
Parents:
be50969
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libdl/rtl.c

    rbe50969 rb36c5209  
    478478rtems_rtl_find_obj_with_symbol (const rtems_rtl_obj_sym* sym)
    479479{
    480   rtems_chain_node* node = rtems_chain_first (&rtl->objects);
    481   while (!rtems_chain_is_tail (&rtl->objects, node))
    482   {
    483     rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
    484     if (rtems_rtl_obj_has_symbol (obj, sym))
    485       return obj;
    486     node = rtems_chain_next (node);
    487   }
    488   node = rtems_chain_first (&rtl->pending);
    489   while (!rtems_chain_is_tail (&rtl->pending, node))
    490   {
    491     rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
    492     if (rtems_rtl_obj_has_symbol (obj, sym))
    493       return obj;
    494     node = rtems_chain_next (node);
     480  if (sym != NULL)
     481  {
     482    rtems_chain_node* node = rtems_chain_first (&rtl->objects);
     483    while (!rtems_chain_is_tail (&rtl->objects, node))
     484    {
     485      rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
     486      if (rtems_rtl_obj_has_symbol (obj, sym))
     487        return obj;
     488      node = rtems_chain_next (node);
     489    }
     490    node = rtems_chain_first (&rtl->pending);
     491    while (!rtems_chain_is_tail (&rtl->pending, node))
     492    {
     493      rtems_rtl_obj* obj = (rtems_rtl_obj*) node;
     494      if (rtems_rtl_obj_has_symbol (obj, sym))
     495        return obj;
     496      node = rtems_chain_next (node);
     497    }
    495498  }
    496499  return NULL;
Note: See TracChangeset for help on using the changeset viewer.