[patch 02/14] Modules: Include sections.h to avoid defining linker variables explicitly

Christoph Lameter
2007-11-27T00:18:43Z

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

Module.c should not define linker variables on its own. We have an include
file for that.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Christoph Lameter <clameter@sgi.com>

---
kernel/module.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6/kernel/module.c
===================================================================
--- linux-2.6.orig/kernel/module.c 2007-11-21 13:11:28.495858392 -0800
+++ linux-2.6/kernel/module.c 2007-11-21 13:11:29.322858718 -0800
@@ -46,6 +46,7 @@
#include <asm/semaphore.h>
#include <asm/cacheflush.h>
#include <linux/license.h>
+#include <asm/sections.h>

extern int module_sysfs_initialized;

@@ -338,9 +339,6 @@ static inline unsigned int block_size(in
return val;
}

-/* Created by linker magic */
-extern char __per_cpu_start[], __per_cpu_end[];
-
static void *percpu_modalloc(unsigned long size, unsigned long align,
const char *name)
{

--