ITPub博客

首页 > Linux操作系统 > Linux操作系统 > init/built-in.o: In function `do_one_initcall

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

原创 Linux操作系统 作者:late0001 时间:2015-06-06 23:19:44 0 删除 编辑
init/built-in.o: In function `do_one_initcall':
/home/sources/linux-2.6.29/init/main.c:694: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `init_post':
/home/sources/linux-2.6.29/init/main.c:790: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `name_to_dev_t':
/home/sources/linux-2.6.29/init/do_mounts.c:77: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `rest_init':
/home/sources/linux-2.6.29/init/main.c:452: undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `calibrate_delay':
/home/sources/linux-2.6.29/init/calibrate.c:123: undefined reference to `__gnu_mcount_nc'
arch/arm/kernel/built-in.o:/home/sources/linux-2.6.29/arch/arm/kernel/elf.c:8: more undefined references to `__gnu_mcount_nc' follow
make: *** [.tmp_vmlinux1] Error 1

解决方法:

需要补丁__gnu_mcount_nc_patch.patch.gz

下载之后放在Linux内核根目录下,如我的是:/home/liuhui8989/Information/linux-2.6.31

从终端下进入根目录/home/liuhui8989/Information/linux-2.6.31下执行以下操作:

 gunzip -dc __gnu_mcount_nc_patch.patch.gz |patch -p1

 (注意:“__”为两个下划线连在一起,“p1”后面的是阿拉伯数字1,还要注意空格)

打印出以下信息即表示成功:

root@ubuntu:/home/liuhui8989/Information/linux-2.6.31# gunzip -dc __gnu_mcount_nc_patch.patch.gz |patch -p1
patching file arch/arm/include/asm/ftrace.h
patching file arch/arm/kernel/armksyms.c
patching file arch/arm/kernel/entry-common.S


注:解压__gnu_mcount_nc_patch.patch.gz的,命令:gunzip  -d __gnu_mcount_nc_patch.patch.gz

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30108475/viewspace-1689950/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2015-01-17

  • 博文量
    51
  • 访问量
    112131