summaryrefslogtreecommitdiffstats
path: root/cpukit/libdl
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2015-12-15 11:25:01 -0600
committerJoel Sherrill <joel@rtems.org>2016-01-04 11:07:00 -0600
commitf5201df0dc70e4510c7a6862a96d66175fbbf514 (patch)
tree15d987c5f736df81896df34598294eeae6b03db7 /cpukit/libdl
parentpowerpc/qemuppc/configure.ac: Correct typo (diff)
downloadrtems-f5201df0dc70e4510c7a6862a96d66175fbbf514.tar.bz2
Remove M32R architecture
updates #2446.
Diffstat (limited to 'cpukit/libdl')
-rw-r--r--cpukit/libdl/include/arch/m32r/machine/elf_machdep.h39
-rw-r--r--cpukit/libdl/rtl-mdreloc-m32r.c156
-rw-r--r--cpukit/libdl/rtl-shell.c2
3 files changed, 1 insertions, 196 deletions
diff --git a/cpukit/libdl/include/arch/m32r/machine/elf_machdep.h b/cpukit/libdl/include/arch/m32r/machine/elf_machdep.h
deleted file mode 100644
index 3f531cf901..0000000000
--- a/cpukit/libdl/include/arch/m32r/machine/elf_machdep.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#define ELF32_MACHDEP_ENDIANNESS ELFDATA2MSB
-
-#define ELF32_MACHDEP_ID_CASES \
- case EM_M32R: \
- break;
-
-#define ELF32_MACHDEP_ID EM_M32R
-
-#define ARCH_ELFSIZE 32
-
-#define R_M32R_NONE 0
-/*-----------OLD TYPE-------------*/
-#define R_M32R_16 1
-#define R_M32R_32 2
-#define R_M32R_24 3
-#define R_M32R_10_PCREL 4
-#define R_M32R_18_PCREL 5
-#define R_M32R_26_PCREL 6
-#define R_M32R_HI16_ULO 7
-#define R_M32R_HI16_SLO 8
-#define R_M32R_LO16 9
-#define R_M32R_SDA16 10
-#define R_M32R_GNU_VTINHERIT 11
-#define R_M32R_GNU_VTENTRY 12
-/*--------------------------------*/
-
-#define R_M32R_16_RELA 33
-#define R_M32R_32_RELA 34
-#define R_M32R_24_RELA 35
-#define R_M32R_18_PCREL_RELA 37
-#define R_M32R_26_PCREL_RELA 38
-#define R_M32R_HI16_ULO_RELA 39
-#define R_M32R_HI16_SLO_RELA 40
-#define R_M32R_LO16_RELA 41
-#define R_M32R_SDA16_RELA 42
-#define R_M32R_RELA_GNU_VTINHERIT 43
-#define R_M32R_RELA_GNU_VTENTRY 44
-
-#define R_TYPE(name) __CONCAT(R_M32R_,name)
diff --git a/cpukit/libdl/rtl-mdreloc-m32r.c b/cpukit/libdl/rtl-mdreloc-m32r.c
deleted file mode 100644
index 265e9cb7ae..0000000000
--- a/cpukit/libdl/rtl-mdreloc-m32r.c
+++ /dev/null
@@ -1,156 +0,0 @@
-#include <sys/cdefs.h>
-
-#include <errno.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <rtems/rtl/rtl.h>
-#include "rtl-elf.h"
-#include "rtl-error.h"
-#include "rtl-trace.h"
-
-static inline Elf_Addr
-load_ptr(void *where)
-{
- Elf_Addr res;
-
- memcpy(&res, where, sizeof(res));
-
- return (res);
-}
-
-static inline void
-store_ptr(void *where, Elf_Addr val)
-{
- memcpy(where, &val, sizeof(val));
-}
-
-bool
-rtems_rtl_elf_rel_resolve_sym (Elf_Word type)
-{
- return true;
-}
-
-bool
-rtems_rtl_elf_relocate_rela (const rtems_rtl_obj_t* obj,
- const Elf_Rela* rela,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
-{
-
- Elf_Addr *where;
- Elf_Word tmp;
-
- where = (Elf_Addr *)(sect->base + rela->r_offset);
- if (rtems_rtl_trace (RTEMS_RTL_TRACE_RELOC)) {
- printf("relocated address 0x%08lx\n", (Elf_Addr)where);
- }
-
- switch (ELF_R_TYPE(rela->r_info)) {
- case R_TYPE(NONE):
- break;
-
- case R_TYPE(16_RELA):
- /*
- * half16: S + A
- */
- *(uint16_t *)where = (symvalue + rela->r_addend) & 0xffff;
- break;
-
- case R_TYPE(24_RELA):
- /*
- * imm24: (S + A) & 0xFFFFFF
- */
- tmp = symvalue + rela->r_addend;
- if (((Elf_Sword)tmp > 0x7fffff) || ((Elf_Sword)tmp < -0x800000)) {
- printf("24_RELA Overflow\n");
- return false;
- }
- *where = (*where & 0xff000000) | (tmp & 0xffffff);
- break;
-
- case R_TYPE(32_RELA):
- /*
- * word32: S + A
- */
- *where += symvalue + rela->r_addend;
- break;
-
- case R_TYPE(26_PCREL_RELA):
- /*
- * disp24: ((S + A - P) >> 2) & 0xFFFFFF
- */
- tmp = symvalue + rela->r_addend - (Elf_Addr)where;
- tmp = (Elf_Sword)tmp >> 2;
- if (((Elf_Sword)tmp > 0x7fffff) || ((Elf_Sword)tmp < -0x800000)) {
- printf("26_PCREL_RELA Overflow\n");
- return false;
- }
-
- *where = (*where & 0xff000000) | (tmp & 0xffffff);
- break;
-
- case R_TYPE(18_PCREL_RELA):
- /*
- * disp16: ((S + A - P) >> 2) & 0xFFFFFF
- */
- tmp = symvalue + rela->r_addend - (Elf_Addr)where;
- tmp = (Elf_Sword)tmp >> 2;
- if (((Elf_Sword)tmp > 0x7fff) || ((Elf_Sword)tmp < -0x8000)) {
- printf("18_PCREL_RELA Overflow\n");
- return false;
- }
-
- *where = (*where & 0xffff0000) | (tmp & 0xffff);
- break;
-
- case R_TYPE(HI16_ULO_RELA):
- /*
- * imm16: ((S + A) >> 16)
- */
- tmp = *where;
- tmp += ((symvalue + rela->r_addend) >> 16) & 0xffff;
- *where = tmp;
- break;
-
- case R_TYPE(HI16_SLO_RELA):
- /*
- * imm16: ((S + A) >> 16) or ((S + A + 0x10000) >> 16)
- */
- tmp = symvalue + rela->r_addend;
- if (tmp & 0x8000) tmp += 0x10000;
- tmp = (tmp >> 16) & 0xffff;
- *where += tmp;
- break;
-
- case R_TYPE(LO16_RELA):
- /*
- * imm16: (S + A) & 0xFFFF
- */
- tmp = symvalue + rela->r_addend;
- *where = (*where & 0xffff0000) | (tmp & 0xffff);
- break;
-
- default:
- rtems_rtl_set_error (EINVAL, "rela type record not supported");
- printf("Unsupported rela reloc types\n");
- return false;
- }
- return true;
-}
-
-bool
-rtems_rtl_elf_relocate_rel (const rtems_rtl_obj_t* obj,
- const Elf_Rel* rel,
- const rtems_rtl_obj_sect_t* sect,
- const char* symname,
- const Elf_Byte syminfo,
- const Elf_Word symvalue)
-{
-
- rtems_rtl_set_error (EINVAL, "rel type record not supported");
- return true;
-}
diff --git a/cpukit/libdl/rtl-shell.c b/cpukit/libdl/rtl-shell.c
index 20a6aabe05..a10c931c6e 100644
--- a/cpukit/libdl/rtl-shell.c
+++ b/cpukit/libdl/rtl-shell.c
@@ -25,7 +25,7 @@
* Flag the targets where off_t is 32 bits. This is not a compiler type
* so we can't rely on prerdefines.
*/
-#if defined(__m32r__) || defined(__moxie__)
+#if defined(__moxie__)
#define PRIdoff_t PRIo32
#else
#define PRIdoff_t PRIo64