[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] [patch] move EM_XILINX_MICROBLAZE, use it in modutils/insmod.c
- To: microblaze-uclinux@xxxxxxxxxxxxxx, busybox@xxxxxxxxxxx
- Subject: [microblaze-uclinux] [patch] move EM_XILINX_MICROBLAZE, use it in modutils/insmod.c
- From: "Greg Steuck" <greg@xxxxxxx>
- Date: Fri, 16 May 2008 17:06:43 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; bh=f2rgtpmmPodP2k+OqropMp73zpmi6eadmulw+CHAU5A=; b=gZ/tFdJ+5g2vZTlvDk/AIFSWn859gN5IKZKC/Ea803NFDRYrW7XgyAv573OUmaJ+NNjQPKsTxLHalBHHVQWChxdHkCwK2+jE1vaIJZEPeYu1X63SulnevPOVY3TEOSArPxX0mzYll5Mltc5Ds5UaqLyVChrUdXzdk6mjEo2O5A8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=cVLrN8ubNJWWx7Zx0I5lSSq+cd6lGoirlN5qIOG/L9YbhzWHfHYUSnWil2DPt51q1B8C9Dhoe5kYqCqHa7Kov2A7gb5+T8Elu1R4DZwzyx4A25+hUUt06EJKRmxLcxDRiXW7spGx7njdEAca/Op8Di34tZucgS5MJ1Yx5CcWm3A=
- Reply-to: microblaze-uclinux@xxxxxxxxxxxxxx
- Sender: owner-microblaze-uclinux@xxxxxxxxxxxxxx
Hello,
In the process of building busybox-1.10.1 for microblaze-linux-mmu I had to
make a change to the Linux kernel (patch attached):
Moved EM_XILINX_MICROBLAZE to the central location where every
other kind of ELF_<PLATFORM> is defined. This seems more
consistent with other platforms and also allows busybox
modutils/insmod.c to compile with just a dependency on
linux/elf-em.h without forcing installation of
asm-microblaze/elf.h into headers_install.
I also needed to include linux/elf-em.h in
busybox-1.10.1/modutils/insmod.c (also attached).
I placed the include conservatively, but it probably belongs at the
top along of the file.
Do these changes look correct?
Thanks
Greg
--
nest.cx is Gmail hosted, use PGP for anything private. Key:
http://tinyurl.com/ho8qg
Fingerprint: 5E2B 2D0E 1E03 2046 BEC3 4D50 0B15 42BD 8DF5 A1B0
Moved EM_XILINX_MICROBLAZE to the central location where every
other kind of ELF_<PLATFORM> is defined. This seems more
consistent with other platforms and also allows busybox
modutils/insmod.c to compile with just a dependency on
linux/elf-em.h without forcing installation of
asm-microblaze/elf.h into headers_install.
--- linux_2_6_25/include/asm-microblaze/elf.h#2 2008-05-16 15:47:35.000000000 -0700
+++ linux_2_6_25/include/asm-microblaze/elf.h#3 2008-05-16 16:51:10.000000000 -0700
@@ -15,13 +15,6 @@
#include <linux/autoconf.h>
-/*
- * Note there is no "official" ELF designation for Microblaze.
- * I've snaffled the value from the microblaze binutils source code
- * /binutils/microblaze/include/elf/microblaze.h
- */
-
-#define EM_XILINX_MICROBLAZE 0xbaab
#define ELF_ARCH EM_XILINX_MICROBLAZE
/*
--- linux_2_6_25/include/linux/elf-em.h#1 2008-05-16 15:47:35.000000000 -0700
+++ linux_2_6_25/include/linux/elf-em.h#2 2008-05-16 16:51:10.000000000 -0700
@@ -48,6 +48,14 @@
#define EM_CYGNUS_M32R 0x9041
/* This is the old interim value for S/390 architecture */
#define EM_S390_OLD 0xA390
+
+/*
+ * Note there is no "official" ELF designation for Microblaze.
+ * I've snaffled the value from the microblaze binutils source code
+ * /binutils/microblaze/include/elf/microblaze.h
+ */
+#define EM_XILINX_MICROBLAZE 0xbaab
+
/* Also Panasonic/MEI MN10300, AM33 */
#define EM_CYGNUS_MN10300 0xbeef
EM_XILINX_MICROBLAZE should be declared in linux/elf-em.h.
Get it from there.
--- modutils/insmod.c~ 2008-04-18 20:50:30.000000000 -0700
+++ modutils/insmod.c 2008-05-15 17:08:42.000000000 -0700
@@ -184,6 +184,7 @@
/* Microblaze */
#if defined(__microblaze__)
#define USE_SINGLE
+#include <linux/elf-em.h>
#define MATCH_MACHINE(x) (x == EM_XILINX_MICROBLAZE)
#define SHT_RELM SHT_RELA
#define Elf32_RelM Elf32_Rela