gcc-3.4 incorretly inlines rest_init() into start_kernel(), causing things to crash when the .text.init section gets unloaded. Use noinline to prevent that. --- init/main.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -puN init/main.c~dont-inline-rest_init init/main.c --- 25/init/main.c~dont-inline-rest_init 2004-01-25 22:56:22.000000000 -0800 +++ 25-akpm/init/main.c 2004-01-25 22:56:48.000000000 -0800 @@ -370,9 +370,11 @@ static void __init smp_init(void) * between the root thread and the init thread may cause start_kernel to * be reaped by free_initmem before the root thread has proceeded to * cpu_idle. + * + * gcc-3.4 accidentally inlines this function, so use noinline. */ -static void rest_init(void) +static void noinline rest_init(void) { kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND); unlock_kernel(); _