X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fkernel%2Fmodule.c;h=eb9240e9a7d51a85f13fd5a55d22c8fe932a8c0d;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=a16951f49457051c8ec5aa8985ab0d37ce6dc166;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/arm/kernel/module.c b/arch/arm/kernel/module.c index a16951f49..eb9240e9a 100644 --- a/arch/arm/kernel/module.c +++ b/arch/arm/kernel/module.c @@ -9,6 +9,7 @@ * * Module allocation method suggested by Andi Kleen. */ +#include #include #include #include @@ -19,6 +20,18 @@ #include +#ifdef CONFIG_XIP_KERNEL +/* + * The XIP kernel text is mapped in the module area for modules and + * some other stuff to work without any indirect relocations. + * MODULE_START is redefined here and not in asm/memory.h to avoid + * recompiling the whole kernel when CONFIG_XIP_KERNEL is turned on/off. + */ +extern void _etext; +#undef MODULE_START +#define MODULE_START (((unsigned long)&_etext + ~PGDIR_MASK) & PGDIR_MASK) +#endif + void *module_alloc(unsigned long size) { struct vm_struct *area;