diff options
author | Chris Johns <chrisj@rtems.org> | 2019-05-03 10:15:20 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-05-03 10:15:20 +1000 |
commit | b36c52097f52012f9a52dff6fc8393d63805158b (patch) | |
tree | 011b4cb678d343e0e6422d36bbcce982fdf48e30 /cpukit/libdl/rtl-mdreloc-v850.c | |
parent | bsp/motorola_powerpc: Fix debug output (diff) | |
download | rtems-b36c52097f52012f9a52dff6fc8393d63805158b.tar.bz2 |
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
Diffstat (limited to 'cpukit/libdl/rtl-mdreloc-v850.c')
-rw-r--r-- | cpukit/libdl/rtl-mdreloc-v850.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/cpukit/libdl/rtl-mdreloc-v850.c b/cpukit/libdl/rtl-mdreloc-v850.c index 93e531b40e..859225ca6f 100644 --- a/cpukit/libdl/rtl-mdreloc-v850.c +++ b/cpukit/libdl/rtl-mdreloc-v850.c @@ -67,7 +67,7 @@ rtems_rtl_elf_relocate_tramp_max_size (void) return 0; } -bool +rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rela_tramp (rtems_rtl_obj* obj, const Elf_Rela* rela, const rtems_rtl_obj_sect* sect, @@ -81,10 +81,10 @@ rtems_rtl_elf_relocate_rela_tramp (rtems_rtl_obj* obj, (void) symname; (void) syminfo; (void) symvalue; - return true; + return rtems_rtl_elf_rel_no_error; } -bool +rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rela (rtems_rtl_obj* obj, const Elf_Rela* rela, const rtems_rtl_obj_sect* sect, @@ -125,7 +125,7 @@ rtems_rtl_elf_relocate_rela (rtems_rtl_obj* obj, tmp = symvalue + rela->r_addend - (Elf_Addr)where; if (((Elf_Sword)tmp > 0x1fffff) || ((Elf_Sword)tmp < -0x200000)) { printf("Overflow\n"); - return false; + return rtems_rtl_elf_rel_failure; } ((uint16_t *)where)[0] = (*(uint16_t *)where & 0xffc0) | @@ -145,13 +145,13 @@ rtems_rtl_elf_relocate_rela (rtems_rtl_obj* obj, default: rtems_rtl_set_error (EINVAL, "rela type record not supported"); printf("error reloc type\n"); - return false; + return rtems_rtl_elf_rel_failure; } - return true; + return rtems_rtl_elf_rel_no_error; } -bool +rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rel_tramp (rtems_rtl_obj* obj, const Elf_Rel* rel, const rtems_rtl_obj_sect* sect, @@ -166,10 +166,10 @@ rtems_rtl_elf_relocate_rel_tramp (rtems_rtl_obj* obj, (void) syminfo; (void) symvalue; rtems_rtl_set_error (EINVAL, "rel type record not supported"); - return false; + return rtems_rtl_elf_rel_failure; } -bool +rtems_rtl_elf_rel_status rtems_rtl_elf_relocate_rel (rtems_rtl_obj* obj, const Elf_Rel* rel, const rtems_rtl_obj_sect* sect, @@ -184,7 +184,7 @@ rtems_rtl_elf_relocate_rel (rtems_rtl_obj* obj, (void) syminfo; (void) symvalue; rtems_rtl_set_error (EINVAL, "rel type record not supported"); - return false; + return rtems_rtl_elf_rel_failure; } bool |