Changeset b36c5209 in rtems for cpukit/libdl/rtl-mdreloc-v850.c


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-v850.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;
    85 }
    86 
    87 bool
     84  return rtems_rtl_elf_rel_no_error;
     85}
     86
     87rtems_rtl_elf_rel_status
    8888rtems_rtl_elf_relocate_rela (rtems_rtl_obj*            obj,
    8989                             const Elf_Rela*           rela,
     
    126126      if (((Elf_Sword)tmp > 0x1fffff) || ((Elf_Sword)tmp < -0x200000)) {
    127127        printf("Overflow\n");
    128         return false;
     128        return rtems_rtl_elf_rel_failure;
    129129      }
    130130
     
    146146      rtems_rtl_set_error (EINVAL, "rela type record not supported");
    147147      printf("error reloc type\n");
    148       return false;
     148      return rtems_rtl_elf_rel_failure;
    149149  }
    150150
    151   return true;
    152 }
    153 
    154 bool
     151  return rtems_rtl_elf_rel_no_error;
     152}
     153
     154rtems_rtl_elf_rel_status
    155155rtems_rtl_elf_relocate_rel_tramp (rtems_rtl_obj*            obj,
    156156                                  const Elf_Rel*            rel,
     
    167167  (void) symvalue;
    168168  rtems_rtl_set_error (EINVAL, "rel type record not supported");
    169   return false;
    170 }
    171 
    172 bool
     169  return rtems_rtl_elf_rel_failure;
     170}
     171
     172rtems_rtl_elf_rel_status
    173173rtems_rtl_elf_relocate_rel (rtems_rtl_obj*            obj,
    174174                            const Elf_Rel*            rel,
     
    185185  (void) symvalue;
    186186  rtems_rtl_set_error (EINVAL, "rel type record not supported");
    187   return false;
     187  return rtems_rtl_elf_rel_failure;
    188188}
    189189
Note: See TracChangeset for help on using the changeset viewer.