aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-08-19 19:17:30 +0000
committerEric Andersen <andersen@codepoet.org>2004-08-19 19:17:30 +0000
commita4d27d2d385db205a9e6a0983985e02085f910ef (patch)
tree257074c755cd8af523a8381baf14791ab81885f8
parenta9eb33ddc73f2e98063798652b23d4191e7d5a0e (diff)
downloadbusybox-w32-a4d27d2d385db205a9e6a0983985e02085f910ef.tar.gz
busybox-w32-a4d27d2d385db205a9e6a0983985e02085f910ef.tar.bz2
busybox-w32-a4d27d2d385db205a9e6a0983985e02085f910ef.zip
Patch from Rodney Radford adding x86_64 support.
-rw-r--r--modutils/insmod.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/modutils/insmod.c b/modutils/insmod.c
index d1aa24f14..c057774b6 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -2,12 +2,15 @@
2/* 2/*
3 * Mini insmod implementation for busybox 3 * Mini insmod implementation for busybox
4 * 4 *
5 * This version of insmod supports x86, ARM, SH3/4/5, powerpc, m68k, 5 * This version of insmod supports x86, x86_64, ARM, SH3/4/5, powerpc, m68k,
6 * MIPS, v850e, and H8/300. 6 * MIPS, v850e, and H8/300.
7 * 7 *
8 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> 8 * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org>
9 * and Ron Alder <alder@lineo.com> 9 * and Ron Alder <alder@lineo.com>
10 * 10 *
11 * Rodney Radford <rradford@mindspring.com> 17-Aug-2004.
12 * Added x86_64 support.
13 *
11 * Miles Bader <miles@gnu.org> added NEC V850E support. 14 * Miles Bader <miles@gnu.org> added NEC V850E support.
12 * 15 *
13 * Modified by Bryan Rittmeyer <bryan@ixiacom.com> to support SH4 16 * Modified by Bryan Rittmeyer <bryan@ixiacom.com> to support SH4
@@ -148,6 +151,13 @@ extern int insmod_ng_main( int argc, char **argv);
148#define ELFCLASSM ELFCLASS32 151#define ELFCLASSM ELFCLASS32
149#endif 152#endif
150 153
154#if defined(__x86_64__)
155#define MATCH_MACHINE(x) (x == EM_X86_64)
156#define SHT_RELM SHT_REL
157#define Elf64_RelM Elf64_Rel
158#define ELFCLASSM ELFCLASS64
159#endif
160
151#if defined(__mc68000__) 161#if defined(__mc68000__)
152#define CONFIG_USE_GOT_ENTRIES 162#define CONFIG_USE_GOT_ENTRIES
153#define CONFIG_GOT_ENTRY_SIZE 4 163#define CONFIG_GOT_ENTRY_SIZE 4
@@ -290,7 +300,7 @@ extern int insmod_ng_main( int argc, char **argv);
290#ifndef MODUTILS_MODULE_H 300#ifndef MODUTILS_MODULE_H
291static const int MODUTILS_MODULE_H = 1; 301static const int MODUTILS_MODULE_H = 1;
292 302
293#ident "$Id: insmod.c,v 1.122 2004/07/20 15:43:57 sandman Exp $" 303#ident "$Id: insmod.c,v 1.123 2004/08/19 19:17:30 andersen Exp $"
294 304
295/*======================================================================*/ 305/*======================================================================*/
296/* For sizeof() which are related to the module platform and not to the 306/* For sizeof() which are related to the module platform and not to the
@@ -448,7 +458,7 @@ int delete_module(const char *);
448#ifndef MODUTILS_OBJ_H 458#ifndef MODUTILS_OBJ_H
449static const int MODUTILS_OBJ_H = 1; 459static const int MODUTILS_OBJ_H = 1;
450 460
451#ident "$Id: insmod.c,v 1.122 2004/07/20 15:43:57 sandman Exp $" 461#ident "$Id: insmod.c,v 1.123 2004/08/19 19:17:30 andersen Exp $"
452 462
453/* The relocatable object is manipulated using elfin types. */ 463/* The relocatable object is manipulated using elfin types. */
454 464