mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel Mailinglist <linux-kernel@vger.kernel.org>
Subject: [PATCH] H8/300 support update (4/4)
Date: Fri, 02 May 2003 15:18:36 +0900	[thread overview]
Message-ID: <m2znm5q3b7.wl@ysato.zive.net> (raw)

[-- 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

                 reply	other threads:[~2003-05-02  6:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2znm5q3b7.wl@ysato.zive.net \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®