Found same problem compiling for x86_64.
Kernel for i386 compiles and works without problems.
It seems adding one rule to arch/x86/mm/extable.c fixes the problem
- Code: Select all
--- linux-2.6.31.4-grsec/arch/x86/mm/extable.c 2009-10-13 21:07:59.000000000 +0200
+++ linux-2.6.31.4-grsec/arch/x86/mm/extable.c 2009-10-13 21:11:49.000000000 +0200
@@ -2,6 +2,7 @@
#include <linux/spinlock.h>
#include <linux/sort.h>
#include <asm/uaccess.h>
+#include <asm/pgtable.h>
/*
* The exception table needs to be sorted so that the binary
However the compilation then ends with
- Code: Select all
make[1]: [grsecurity/grsec_hidesym.o] Error 1 (ignored)
make[1]: [grsecurity/grsec_hidesym.o] Error 1 (ignored)
grsec: protected kernel image paths
LD vmlinux.o
MODPOST vmlinux.o
WARNING: modpost: Found 2860 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
GEN .version
CHK include/linux/compile.h
UPD include/linux/compile.h
CC init/version.o
LD init/built-in.o
LD .tmp_vmlinux1
arch/x86/built-in.o: In function `no_context':
fault.c:(.text+0x190e4): undefined reference to `_etext'
arch/x86/built-in.o: In function `__change_page_attr_set_clr':
pageattr.c:(.text+0x1a597): undefined reference to `_etext'
pageattr.c:(.text+0x1a6fa): undefined reference to `_etext'
pageattr.c:(.text+0x1a761): undefined reference to `_etext'
arch/x86/built-in.o: In function `setup_arch':
(.init.text+0xe38): undefined reference to `_etext'
arch/x86/built-in.o:(.init.text+0xe56): more undefined references to `_etext' follow
make: *** [.tmp_vmlinux1] Error 1
And the reference to "#include <asm/sections.h>" was present in arch/x86/mm/pageattr.c