Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261842AbTEBGI1 (ORCPT ); Fri, 2 May 2003 02:08:27 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261832AbTEBGHf (ORCPT ); Fri, 2 May 2003 02:07:35 -0400 Received: from i235066.ppp.asahi-net.or.jp ([61.125.235.66]:52718 "EHLO mitou.ysato.zive.net") by vger.kernel.org with ESMTP id S261842AbTEBGGN (ORCPT ); Fri, 2 May 2003 02:06:13 -0400 Date: Fri, 02 May 2003 15:18:36 +0900 Message-ID: From: Yoshinori Sato To: Linus Torvalds Cc: linux-kernel Mailinglist Subject: [PATCH] H8/300 support update (4/4) User-Agent: Wanderlust/2.10.0 (Venus) SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (=?ISO-8859-4?Q?Kashiharajing=FE-mae?=) APEL/10.4 Emacs/21.2 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: multipart/mixed; boundary="Multipart_Fri_May__2_15:18:36_2003-1" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2211 Lines: 82 --Multipart_Fri_May__2_15:18:36_2003-1 Content-Type: text/plain; charset=US-ASCII include o binfmt_flat h8300 support. -- Yoshinori Sato --Multipart_Fri_May__2_15:18:36_2003-1 Content-Type: application/octet-stream; type=patch Content-Disposition: attachment; filename="linux-2.5.68-h8300-fs.diff" Content-Transfer-Encoding: 7bit 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 #include -#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 --Multipart_Fri_May__2_15:18:36_2003-1-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/