歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux綜合 >> Linux內核

Linux內核編譯錯誤: make: *** [.tmp_vmlinux1] Error 1

若編譯內核出現如下情況:

WARNING: modpost: Found 1 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

init/built-in.o: In function `do_one_initcall':

/root/桌面/linux-2.6.30.4/init/main.c:706: undefined reference to `__gnu_mcount_nc'

init/built-in.o: In function `init_post':

/root/桌面/linux-2.6.30.4/init/main.c:804: undefined reference to `__gnu_mcount_nc'

init/built-in.o: In function `name_to_dev_t':

/root/桌面/linux-2.6.30.4/init/do_mounts.c:78: undefined reference to `__gnu_mcount_nc'

init/built-in.o: In function `rest_init':

/root/桌面/linux-2.6.30.4/init/main.c:453: undefined reference to `__gnu_mcount_nc'

init/built-in.o: In function `calibrate_delay':

/root/桌面/linux-2.6.30.4/init/calibrate.c:123: undefined reference to `__gnu_mcount_nc'

arch/arm/kernel/built-in.o:/root/桌面/linux-2.6.30.4/arch/arm/kernel/elf.c:8: more undefined references to `__gnu_mcount_nc' follow

make: *** [.tmp_vmlinux1] 錯誤 1

root@czu:~/桌面/linux-2.6.30.4#

解決方法:

需要補丁__gnu_mcount_nc_patch.patch.gz

下載之後放在linux根目錄下,並解壓得到:__gnu_mcount_nc_patch.patch 文件。

然後,在終端進入linux根目錄,執行以下語句進行打包:zcat __gnu_mcount_nc_patch.patch | patch p1

(注意:“__”為兩個下劃線連在一起,“p1”後面的是阿拉伯數字1,還要注意空格)

更多精彩內容:http://www.bianceng.cn/OS/Linux/

Copyright © Linux教程網 All Rights Reserved