加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Linux > 正文

Linux内核编译错误: make: *** [.tmp_vmlinux1] Error 1

发布时间:2016-10-22 06:18:24 所属栏目:Linux 来源:网络整理
导读:若编译内核出现如下情况: WARNING: modpost: Found 1 section mismatch(es). To see full details build your kernel with: 'make CONFIG_DEBUG_SECTION_MISMA

若编译内核出现如下情况:

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/

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    热点阅读