elf_i386或elf_x86_64:没有那个文件或目录 解决方法
 2016.02.29    |      Linux问题集合    |     AilsonJack    |     暂无评论    |     3823 views
By: Ailson Jack
Date: 2016-02-29
个人博客: http://www.only2fire.com/
<p style="text-indent: 2em;">最近在编译Linux-2.6.33内核时出现错误,报出的错误的大致信息是:<span style="color: rgb(255, 0, 0);">elf_i386或elf_x86_64:没有那个文件或目录</span>,这里分享一下解决方法,方便遇到同样问题的朋友能够把问题解决。</p><p style="text-indent: 2em;">编译Linux-2.6.33内核,在make menuconfig配置完之后(选的默认配置),然后<span style="color: rgb(255, 0, 0);">make</span>,过一段时间出现如下错误:<br/><span style="color: rgb(255, 0, 0);">gcc: 错误: elf_i386:No such file or directory<br/>make[2]: *** [arch/x86/vdso/vdso32-int80.so.dbg] 错误 1<br/>make[1]: *** [arch/x86/vdso] 错误 2<br/>make: *** [sub-make] 错误 2</span><br/></p><p style="text-indent: 2em;">我的编译结果如下图:</p><p style="text-align:center"><img src="/uploads/AilsonJack/2018.08.24/1535102084123618.png" onclick="preview_image(&#39;/uploads/AilsonJack/2018.08.24/1535102084123618.png&#39;)"/></p><p style="text-indent: 2em;">原因是gcc 4.6不再支持linker-style架构(我使用的是gcc 4.6.3)。<br/>下面是解决方法:<br/></p><p style="text-indent: 2em;">确保当前路径是在内核目录中,然后执行命令:<span style="color: rgb(255, 0, 0);">vim arch/x86/vdso/Makefile</span>,在Makefile中搜索<span style="color: rgb(255, 0, 0);">elf_x86_64</span>,然后把&quot;<span style="color: rgb(0, 112, 192);">-m elf_x86_64</span>&quot;替换为&quot;<span style="color: rgb(0, 112, 192);">-m64</span>&quot;;接着在Makefile中搜索<span style="color: rgb(255, 0, 0);">elf_i386</span>,然后把&quot;<span style="color: rgb(0, 112, 192);">-m elf_i386</span>&quot;替换为&quot;<span style="color: rgb(0, 112, 192);">-m32</span>&quot;,保存退出,问题解决了。接着继续编译,就可以了。<br/></p><p style="text-indent: 2em;">我在编译Linux-2.6.33内核时遇到的另一个问题是:<span style="color: rgb(255, 0, 0);">重复的成员&#39;page&#39;问题</span>,大家可以看看我写的这篇文章《<a href="http://www.only2fire.com/archives/45.html" target="_blank"><span style="color: rgb(255, 0, 0);">重复的成员&#39;page&#39;错误的解决方法</span></a>》。<br/></p><p style="text-indent: 2em;">如果编译过程中,还遇到什么问题,大家可以在网上搜索或者给我留言吧。<br/></p>
欢迎关注博主的公众号呀,精彩内容随时掌握:
热情邀请仔细浏览下博客中的广告,万一有对自己有用或感兴趣的呢。◕ᴗ◕。。
如果这篇文章对你有帮助,记得点赞和关注博主就行了^_^,当然了能够赞赏博主,那就非常感谢啦!
注: 转载请注明出处,谢谢!^_^
暂无评论,要不要来个沙发
发表评论

 
Copyright © 2015~2023  说好一起走   保留所有权利   |  百度统计  蜀ICP备15004292号