[BusyBox-cvs] busybox/modutils insmod.c,1.105,1.106
Manuel Novoa III
mjn3 at busybox.net
Thu Dec 4 15:03:01 UTC 2003
Update of /var/cvs/busybox/modutils
In directory winder:/tmp/cvs-serv8972
Modified Files:
insmod.c
Log Message:
Add (untested) support for cris, based on the (old) busybox insmod
that axis distributes.
Index: insmod.c
===================================================================
RCS file: /var/cvs/busybox/modutils/insmod.c,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -d -r1.105 -r1.106
--- insmod.c 21 Oct 2003 06:45:29 -0000 1.105
+++ insmod.c 4 Dec 2003 15:02:57 -0000 1.106
@@ -219,6 +219,19 @@
#define SYMBOL_PREFIX "_"
#endif
+#if defined(__cris__)
+#ifndef EM_CRIS
+#define EM_CRIS 76
+#define R_CRIS_NONE 0
+#define R_CRIS_32 3
+#endif
+
+#define MATCH_MACHINE(x) (x == EM_CRIS)
+#define SHT_RELM SHT_RELA
+#define Elf32_RelM Elf32_Rela
+#define ELFCLASSM ELFCLASS32
+#endif
+
#ifndef SHT_RELM
#error Sorry, but insmod.c does not yet support this architecture...
#endif
@@ -1280,6 +1293,18 @@
goto bb_use_plt;
#endif
+#if defined (__cris__)
+ case R_CRIS_NONE:
+ break;
+
+ case R_CRIS_32:
+ /* CRIS keeps the relocation value in the r_addend field and
+ * should not use whats in *loc at all
+ */
+ *loc = v;
+ break;
+#endif
+
#if defined(CONFIG_USE_PLT_ENTRIES)
bb_use_plt:
More information about the busybox-cvs
mailing list