Ignore:
Timestamp:
May 3, 2019, 12:15:20 AM (6 months 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-mdreloc-moxie.c

    rbe50969 rb36c5209  
    6868}
    6969
    70 bool
     70rtems_rtl_elf_rel_status
    7171rtems_rtl_elf_relocate_rela_tramp (rtems_rtl_obj*            obj,
    7272                                   const Elf_Rela*           rela,
     
    8282  (void) syminfo;
    8383  (void) symvalue;
    84   return true;
     84  return rtems_rtl_elf_rel_no_error;
    8585}
    8686
    87 bool
     87rtems_rtl_elf_rel_status
    8888rtems_rtl_elf_relocate_rela (rtems_rtl_obj*            obj,
    8989                             const Elf_Rela*           rela,
     
    123123      if (((Elf32_Sword)tmp > 0x1ff) || ((Elf32_Sword)tmp < -(Elf32_Sword)0x200)){
    124124        printf("Overflow for PCREL10: %ld exceed -0x200:0x1ff\n", tmp);
    125         return false;
     125        return rtems_rtl_elf_rel_failure;
    126126      }
    127127
     
    137137      rtems_rtl_set_error (EINVAL, "rela type record not supported");
    138138      printf("Unsupported reloc types\n");
    139       return false;
     139      return rtems_rtl_elf_rel_failure;
    140140  }
    141141
    142   return true;
     142  return rtems_rtl_elf_rel_no_error;
    143143}
    144144
    145 bool
     145rtems_rtl_elf_rel_status
    146146rtems_rtl_elf_relocate_rel_tramp (rtems_rtl_obj*            obj,
    147147                                  const Elf_Rel*            rel,
     
    158158  (void) symvalue;
    159159  rtems_rtl_set_error (EINVAL, "rel type record not supported");
    160   return false;
     160  return rtems_rtl_elf_rel_failure;
    161161}
    162162
    163 bool
     163rtems_rtl_elf_rel_status
    164164rtems_rtl_elf_relocate_rel (rtems_rtl_obj*            obj,
    165165                            const Elf_Rel*            rel,
     
    176176  (void) symvalue;
    177177  rtems_rtl_set_error (EINVAL, "rel type record not supported");
    178   return false;
     178  return rtems_rtl_elf_rel_failure;
    179179}
    180180
Note: See TracChangeset for help on using the changeset viewer.