mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] H8/300 support update (4/4)
@ 2003-05-02  6:18 Yoshinori Sato
  0 siblings, 0 replies; only message in thread
From: Yoshinori Sato @ 2003-05-02  6:18 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel Mailinglist

[-- Attachment #1: Type: text/plain, Size: 89 bytes --]

include 

o binfmt_flat h8300 support.

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>


[-- Attachment #2: linux-2.5.68-h8300-fs.diff --]
[-- Type: application/octet-stream, Size: 1558 bytes --]

Index: fs/binfmt_flat.c
===================================================================
RCS file: /var/lib/cvs/linux-2.5/fs/binfmt_flat.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- fs/binfmt_flat.c	21 Apr 2003 02:22:46 -0000	1.1.1.1
+++ fs/binfmt_flat.c	1 May 2003 13:45:51 -0000	1.2
@@ -42,7 +42,7 @@
 #include <asm/unaligned.h>
 #include <asm/cacheflush.h>
 
-#undef DEBUG
+#define DEBUG
 #ifdef DEBUG
 #define	DBG_FLT(a...)	printk(##a)
 #else
@@ -291,9 +291,12 @@
 #ifdef DEBUG
 	char *segment[] = { "TEXT", "DATA", "BSS", "*UNKNOWN*" };
 #endif
+#if !defined(__H8300H__) && !defined(__H8300S__)
 	flat_v2_reloc_t	r;
+#endif
 	unsigned long *ptr;
 	
+#if !defined(__H8300H__) && !defined(__H8300S__)
 	r.value = rl;
 #if defined(CONFIG_COLDFIRE)
 	ptr = (unsigned long *) (current->mm->start_code + r.reloc.offset);
@@ -325,6 +328,14 @@
 #ifdef DEBUG
 	printk("Relocation became %x\n", (int)*ptr);
 #endif
+#else
+	ptr = (unsigned long *)(current->mm->start_code+rl);
+	if (ptr >= current->mm->end_code)
+		ptr += 1;
+	*ptr += current->mm->start_code;
+	if ((*ptr & 0x00ffffff) >= current->mm->end_code)
+		*ptr += sizeof(unsigned long);
+#endif
 }		
 
 
@@ -389,7 +400,11 @@
 	 * fix up the flags for the older format,  there were all kinds
 	 * of endian hacks,  this only works for the simple cases
 	 */
-	if (rev == OLD_FLAT_VERSION && flags)
+	if (rev == OLD_FLAT_VERSION
+#if !defined(__H8300H__) && !defined(__H8300S__)
+			&& flags
+#endif
+			)
 		flags = FLAT_FLAG_RAM;
 
 #ifndef CONFIG_BINFMT_ZFLAT

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-02  6:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-02  6:18 [PATCH] H8/300 support update (4/4) Yoshinori Sato

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®