编译内核出现问题: undefined reference to `__gnu_mcount_nc'
2013-10-29 16:42
615 查看
在编译内核时出现了如下错误:
init/built-in.o: In function `do_one_initcall':
calibrate.c:(.text+0x14): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `init_post':
calibrate.c:(.text+0x1d4): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `name_to_dev_t':
calibrate.c:(.text+0x358): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `rest_init':
calibrate.c:(.ref.text+0x10): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `calibrate_delay':
calibrate.c:(.cpuinit.text+0x10): undefined reference to `__gnu_mcount_nc'
arch/arm/kernel/built-in.o:io.c:(.text+0x10): more undefined references to `__gnu_mcount_nc' follow
make: *** [.tmp_vmlinux1] Error 1
上网参阅以下两个网页,
http://forum.ubuntu.org.cn/viewtopic.php?t=333083http://blog.sina.com.cn/s/blog_7d3976fc01012itz.html得出解决方法:
在网上下载一个补丁文件:地址如下:
www.arm9home.net/job.php?action-download-pid-37009-tid-7318-aid-1431.html
方法一,下载到Linux内核目录下,然后gunzip -dc __gnu_mcount_nc_patch.patch.gz |patch -p1
方法二,下载之后放在linux根目录下,并解压得到:__gnu_mcount_nc_patch.patch 文件。
然后,在终端进入linux根目录,执行以下语句进行打包:
zcat __gnu_mcount_nc_patch.patch | patch p1 或者
(注意:“__”为两个下划线连在一起,“p1”后面的是阿拉伯数字1,还要注意空格)
再重新编译就好了。
init/built-in.o: In function `do_one_initcall':
calibrate.c:(.text+0x14): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `init_post':
calibrate.c:(.text+0x1d4): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `name_to_dev_t':
calibrate.c:(.text+0x358): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `rest_init':
calibrate.c:(.ref.text+0x10): undefined reference to `__gnu_mcount_nc'
init/built-in.o: In function `calibrate_delay':
calibrate.c:(.cpuinit.text+0x10): undefined reference to `__gnu_mcount_nc'
arch/arm/kernel/built-in.o:io.c:(.text+0x10): more undefined references to `__gnu_mcount_nc' follow
make: *** [.tmp_vmlinux1] Error 1
上网参阅以下两个网页,
http://forum.ubuntu.org.cn/viewtopic.php?t=333083http://blog.sina.com.cn/s/blog_7d3976fc01012itz.html得出解决方法:
在网上下载一个补丁文件:地址如下:
www.arm9home.net/job.php?action-download-pid-37009-tid-7318-aid-1431.html
方法一,下载到Linux内核目录下,然后gunzip -dc __gnu_mcount_nc_patch.patch.gz |patch -p1
方法二,下载之后放在linux根目录下,并解压得到:__gnu_mcount_nc_patch.patch 文件。
然后,在终端进入linux根目录,执行以下语句进行打包:
zcat __gnu_mcount_nc_patch.patch | patch p1 或者
(注意:“__”为两个下划线连在一起,“p1”后面的是阿拉伯数字1,还要注意空格)
再重新编译就好了。
相关文章推荐
- 【嵌入式Linux】[内核编译]:内核编译时出现的问题:undefined reference to `__gnu_mcount_nc'
- undefined reference to `__gnu_mcount_nc'的解决 在编译内核时出现了如下错误:
- 关于编译内核时候出现__gnu_mcount_nc的问题以及解决办法
- 用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality_v0'"问题的解决
- NiosII timestamp使用时编译出现undefined reference to `alt_timestamp问题
- ----linux--内核编译的问题:undefined reference to `printascii'
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- 用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality_v0'"问题的解决
- 编译3.10内核 出现错误 “undefined reference to...." 解决方法
- undefined reference to `__gnu_mcount_nc'
- 用gcc编译.cpp文件可能出现"undefined reference to `__gxx_personality_v0'"问题
- GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- 编译3.10内核 出现错误 “undefined reference to...." 解决方法
- 解决DEV C++编译时出现的“ undefined reference to `___dyn_tls_init_callback'...”问题
- ffmpeg libx264编译出现error: undefined reference to 'x264_picture_init'等问题的解决方法
- gcc编译出现 undefined reference to 的问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题
- ubuntu下 GCC编译程序出现 undefined reference to `std::ios_base::Init::Init()'问题——gcc编译C++代码