diff -u -3 -p -u -r1.1.1.4 exec.c
--- linux-2.4.x/fs/exec.c	28 Feb 2003 22:44:49 -0000	1.1.1.4
+++ linux-2.4.x/fs/exec.c	21 May 2003 13:03:56 -0000
@@ -444,12 +444,14 @@ static int exec_mmap(void)
 			return -ENOMEM;
 		}
 
+#ifndef NO_MM
 		/* Add it to the list of mm's */
 		spin_lock(&mmlist_lock);
 		list_add(&mm->mmlist, &init_mm.mmlist);
 		mmlist_nr++;
 		spin_unlock(&mmlist_lock);
-
+#endif /* NO_MM */
+		
 		task_lock(current);
 		active_mm = current->active_mm;
 		current->mm = mm;
diff -u -3 -p -u -r1.1.1.5 fork.c
--- linux-2.4.x/kernel/fork.c	28 Feb 2003 22:45:16 -0000	1.1.1.5
+++ linux-2.4.x/kernel/fork.c	21 May 2003 13:03:56 -0000
@@ -381,34 +381,6 @@ fail_nomem:
 
 #else /* !CONFIG_UCLINUX */
 
-spinlock_t mmlist_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
-int mmlist_nr;
-
-static inline int dup_mmap(struct mm_struct * mm)
-{
-	struct mm_tblock_struct * tmp = &current->mm->tblock;
-	struct mm_tblock_struct * newtmp = &mm->tblock;
-	extern long realalloc, askedalloc;	
-
-	/* Kill me slowly. UGLY! FIXME! */
-	memcpy(&mm->start_code, &current->mm->start_code, 15*sizeof(unsigned long));
-	mm->tblock.rblock = 0;
-	mm->tblock.next = 0;
-
-	while((tmp = tmp->next)) {
-		newtmp->next = kmalloc(sizeof(struct mm_tblock_struct), GFP_KERNEL);
-		if (!newtmp->next) return -ENOMEM; /* FIXME:  Does not unwind */
-		realalloc += ksize(newtmp->next);
-		askedalloc += sizeof(struct mm_tblock_struct);
-		newtmp->next->rblock = tmp->rblock;
-		if (tmp->rblock)
-			tmp->rblock->refcount++;
-		newtmp->next->next = 0;
-		newtmp = newtmp->next;
-	}
-	return 0;
-}
-
 /*
  * Allocate and initialize an mm_struct.
  */
diff -u -3 -p -u -r1.1.1.5 page_alloc2.c
--- linux-2.4.x/mmnommu/page_alloc2.c	28 Feb 2003 22:45:17 -0000	1.1.1.5
+++ linux-2.4.x/mmnommu/page_alloc2.c	21 May 2003 13:03:56 -0000
@@ -225,8 +225,6 @@ void free_pages(unsigned long addr, unsi
 
 void __free_pages(struct page *page, unsigned int order)
 {
-	int flags;
-
 	DBG_ALLOC("%s,%d: %s(0x%x[0x%x], %d)\n", __FILE__, __LINE__,
 			__FUNCTION__, page, page_address(page), order);

diff -u -r1.10 binfmt_flat.c
--- linux-2.4.x/fs/binfmt_flat.c	16 May 2003 17:05:55 -0000	1.10
+++ linux-2.4.x/fs/binfmt_flat.c	21 May 2003 14:15:55 -0000
@@ -79,14 +79,15 @@
 #endif
 
 static int load_flat_binary(struct linux_binprm *, struct pt_regs * regs);
-static int load_flat_library(struct file*);
 static int flat_core_dump(long signr, struct pt_regs * regs, struct file *file);
 
 extern void dump_thread(struct pt_regs *, struct user *);
 
 static struct linux_binfmt flat_format = {
-	NULL, THIS_MODULE, load_flat_binary, load_flat_library,
-	flat_core_dump, PAGE_SIZE
+	.module		= THIS_MODULE,
+	.load_binary	= load_flat_binary,
+	.core_dump	= flat_core_dump,
+	.min_coredump	= PAGE_SIZE
 };
 
 
@@ -665,6 +666,11 @@
 	}
 
 	/*
+	 * calculate the extra space we need to map in
+	 */
+	extra = MAX(bss_len + stack_len, relocs * sizeof(unsigned long));
+
+	/*
 	 * there are a couple of cases here,  the seperate code/data
 	 * case,  and then the fully copied to RAM case which lumps
 	 * it all together.
@@ -686,8 +692,6 @@
 			return(textpos);
 		}
 
-		extra = MAX(bss_len + stack_len, relocs * sizeof(unsigned long));
-
 		down_write(&current->mm->mmap_sem);
 		realdatastart = do_mmap(0, 0, data_len + extra +
 				MAX_SHARED_LIBS * sizeof(unsigned long),
@@ -729,13 +733,6 @@
 		memp = realdatastart;
 
 	} else {
-
-		/*
-		 * calculate the extra space we need to map in
-		 */
-
-		extra = MAX(bss_len + stack_len, relocs * sizeof(unsigned long));
-
 		down_write(&current->mm->mmap_sem);
 		textpos = do_mmap(0, 0, text_len + data_len + extra +
 					MAX_SHARED_LIBS * sizeof(unsigned long),
@@ -1053,11 +1050,6 @@
 }
 
 /****************************************************************************/
-
-static int load_flat_library(struct file *file)
-{
-	return(-ENOEXEC);
-}
 
 static int __init init_flat_binfmt(void)
 {
