diff options
author | Chris Johns <chrisj@rtems.org> | 2020-05-05 14:53:53 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2020-05-05 14:53:53 +1000 |
commit | fe77587c64b4322cfeaf2dd36b3ef5b6d73acb10 (patch) | |
tree | e1b0713522385eaec9d3fed7ede838ae965f66af | |
parent | libdl: Fix comment. (diff) | |
download | rtems-fe77587c64b4322cfeaf2dd36b3ef5b6d73acb10.tar.bz2 |
libdl/sparc: Print trace message of reloc failture path
Updates #3969
-rw-r--r-- | cpukit/libdl/rtl-mdreloc-sparc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libdl/rtl-mdreloc-sparc.c b/cpukit/libdl/rtl-mdreloc-sparc.c index 548c24132b..f8a4312a8a 100644 --- a/cpukit/libdl/rtl-mdreloc-sparc.c +++ b/cpukit/libdl/rtl-mdreloc-sparc.c @@ -232,8 +232,11 @@ rtems_rtl_elf_relocate_rela (rtems_rtl_obj* obj, * We use the fact that relocation types are an `enum' * Note: R_SPARC_6 is currently numerically largest. */ - if (type > R_TYPE(6)) + if (type > R_TYPE(TLS_TPOFF64)) { + if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) + printf("rtl: invalid reloc type: %d\n", (int) type); return rtems_rtl_elf_rel_failure; + } value = rela->r_addend; |