--- arch/x86/Makefile | 2 +- kernel/module.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -65,7 +65,7 @@ else # -funit-at-a-time shrinks the kernel .text considerably # unfortunately it makes reading oopses harder. - KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time) + KBUILD_CFLAGS += $(call cc-option,-fno-unit-at-a-time) # this works around some issues with generating unwind tables in older gccs # newer gccs do it by default --- a/kernel/module.c +++ b/kernel/module.c @@ -47,7 +47,7 @@ #include #include -#if 0 +#if 1 #define DEBUGP printk #else #define DEBUGP(fmt , a...) @@ -160,9 +160,16 @@ static const struct kernel_symbol *looku const struct kernel_symbol *stop) { const struct kernel_symbol *ks = start; - for (; ks < stop; ks++) + for (; ks < stop; ks++) { + if (ks->name == NULL) { + printk("%ld name NULL (prev %s %lx %s)\n", + (unsigned long)ks-(unsigned long)start, + ks[-1].name, ks[-1].value, ks[-1].namespace); + return NULL; + } if (strcmp(ks->name, name) == 0) return ks; + } return NULL; }