diff options
author | Chris Johns <chrisj@rtems.org> | 2019-07-28 09:12:53 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2019-07-28 09:12:53 +1000 |
commit | 5a678de90ccbce64ff7c39a6a660019494f2a770 (patch) | |
tree | afe93431b3e3f10463c22a1f252bcc52b0105ca1 /cpukit/libdl/rtl-mdreloc-arm.c | |
parent | bsps/arm: Move HYP to SVC change to start.S (diff) | |
download | rtems-5a678de90ccbce64ff7c39a6a660019494f2a770.tar.bz2 |
libdl/arm: Fix ARM mode trampoline parsing of relocs
- No need to dump globals syms in test dl01 when tracing
Closes #3775
Diffstat (limited to 'cpukit/libdl/rtl-mdreloc-arm.c')
-rw-r--r-- | cpukit/libdl/rtl-mdreloc-arm.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cpukit/libdl/rtl-mdreloc-arm.c b/cpukit/libdl/rtl-mdreloc-arm.c index 4d5a2456a7..9e5d66ee1f 100644 --- a/cpukit/libdl/rtl-mdreloc-arm.c +++ b/cpukit/libdl/rtl-mdreloc-arm.c @@ -279,32 +279,32 @@ rtems_rtl_elf_reloc_rel (rtems_rtl_obj* obj, case R_TYPE(V4BX): /* Miscellaneous, ignore */ if (!parsing && rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) { - printf ("rtl: V4BX %p @ %p in %s\n", - (void *)*where, where, rtems_rtl_obj_oname (obj)); + printf ("rtl: V4BX @ %p in %s\n", + where, rtems_rtl_obj_oname (obj)); } break; case R_TYPE(MOVT_ABS): case R_TYPE(MOVW_ABS_NC): - insn = *where; + if (!parsing) { + insn = *where; - addend = ((insn >> 4) & 0xf000) | (insn & 0x0fff); - if (addend & 0x8000) - addend |= 0xffff0000; + addend = ((insn >> 4) & 0xf000) | (insn & 0x0fff); + if (addend & 0x8000) + addend |= 0xffff0000; - tmp = symvalue + addend; + tmp = symvalue + addend; - if (ELF_R_TYPE(rel->r_info) == R_TYPE(MOVW_ABS_NC)) - tmp &= 0xffff; - else { - tmp = (Elf_Sword)tmp >> 16; - if (((Elf_Sword)tmp > 0x7fff) || ((Elf_Sword)tmp < -0x8000)) { - printf("MOVT_ABS Overflow\n"); - return rtems_rtl_elf_rel_failure; + if (ELF_R_TYPE(rel->r_info) == R_TYPE(MOVW_ABS_NC)) + tmp &= 0xffff; + else { + tmp = (Elf_Sword)tmp >> 16; + if (((Elf_Sword)tmp > 0x7fff) || ((Elf_Sword)tmp < -0x8000)) { + printf("MOVT_ABS Overflow\n"); + return rtems_rtl_elf_rel_failure; + } } - } - if (!parsing) { *where = (insn & 0xfff0f000) | ((tmp & 0xf000) << 4) | (tmp & 0xfff); if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) |