Re: [PATCH] Fix undefined symbols for nommu architecture --improved version

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

  This is renewed patch. Tested on Blackfin platform.

  Signed-off-by: Luke Yang <[email protected]>

Index: git/linux-2.6/mm/nommu.c
===================================================================
--- git.orig/linux-2.6/mm/nommu.c	2006-02-20 12:33:25.000000000 +0800
+++ git/linux-2.6/mm/nommu.c	2006-02-20 15:12:08.000000000 +0800
@@ -57,6 +57,8 @@
 EXPORT_SYMBOL(vfree);
 EXPORT_SYMBOL(vmalloc_to_page);
 EXPORT_SYMBOL(vmalloc_32);
+EXPORT_SYMBOL(vmap);
+EXPORT_SYMBOL(vunmap);

 /*
  * Handle all mappings that got truncated by a "truncate()"
Index: git/linux-2.6/include/linux/mm.h
===================================================================
--- git.orig/linux-2.6/include/linux/mm.h	2006-02-20 15:25:21.000000000 +0800
+++ git/linux-2.6/include/linux/mm.h	2006-02-20 15:26:24.000000000 +0800
@@ -1051,7 +1051,11 @@
 void drop_pagecache(void);
 void drop_slab(void);

+#ifndef CONFIG_MMU
+#define randomize_va_space 0
+#else
 extern int randomize_va_space;
+#endif

 #endif /* __KERNEL__ */
 #endif /* _LINUX_MM_H */
Index: git/linux-2.6/kernel/sysctl.c
===================================================================
--- git.orig/linux-2.6/kernel/sysctl.c	2006-02-20 15:26:47.000000000 +0800
+++ git/linux-2.6/kernel/sysctl.c	2006-02-20 15:27:22.000000000 +0800
@@ -638,6 +638,7 @@
 		.proc_handler	= &proc_dointvec,
 	},
 #endif
+#if defined(CONFIG_MMU)
 	{
 		.ctl_name	= KERN_RANDOMIZE,
 		.procname	= "randomize_va_space",
@@ -646,6 +647,7 @@
 		.mode		= 0644,
 		.proc_handler	= &proc_dointvec,
 	},
+#endif
 #if defined(CONFIG_S390) && defined(CONFIG_SMP)
 	{
 		.ctl_name	= KERN_SPIN_RETRY,


On 2/20/06, Andrew Morton <[email protected]> wrote:
> "Luke Yang" <[email protected]> wrote:
> >
> > Index: git/linux-2.6/mm/nommu.c
> >  ===================================================================
> >  --- git.orig/linux-2.6/mm/nommu.c       2006-02-17 17:40:34.000000000 +0800
> >  +++ git/linux-2.6/mm/nommu.c    2006-02-20 12:09:32.000000000 +0800
> >  @@ -57,7 +57,10 @@
> >   EXPORT_SYMBOL(vfree);
> >   EXPORT_SYMBOL(vmalloc_to_page);
> >   EXPORT_SYMBOL(vmalloc_32);
> >  +EXPORT_SYMBOL(vmap);
> >  +EXPORT_SYMBOL(vunmap);
> >
> >  +#define randomize_va_space 0
> >   /*
> >   * Handle all mappings that got truncated by a "truncate()"
> >   * system call.
>
> That can't be right - the #define should be in a header file - mm.h:
>
> #ifdef CONFIG_NOMMU
> #define randomize_va_space 0
> #else
> extern int randomize_va_space;
> #endif
>
> Are you sure you test-compiled this?
 Sorry, nommu.c was compiled but the error still exists at the end of
compilation.  This time it is right.

>


--
Best regards,
Luke Yang
[email protected]; [email protected]
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux