什么是从背后取下gcc4.7.x的的crt0.o理? [英] What is the rationale behind removing crt0.o from gcc4.7.x?

查看:388
本文介绍了什么是从背后取下gcc4.7.x的的crt0.o理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想升级到 yagarto4.7.2 (然而,另一个GNU工具链ARM,对于那些想知道),这是GCC和Binutils ,移植适用于Windows。但是,试图编译一个简单的Hello World收益率:

I am trying to upgrade to yagarto4.7.2 (Yet Another GNU ARM toolchain, for those wondering), which is gcc and binutils, ported for Windows. However, trying to compile a simple Hello World yields:

c:/yagarto-20121222/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi
/bin/ld.exe: cannot find crt0.o: No such file or directory
collect2.exe: error: ld returned 1 exit status

现在,在这个<一个href=\"https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/strange%20errot%20%28crt0%29%20when%20buiding%20a%20project&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B&currentviews=2616\">forum它清楚地表明,这是启动initialziation库,这是gcc4.6.x.后除去提出了两种解决方案:

Now, in this forum it is made clear that this is the startup initialziation library, that was removed after gcc4.6.x. Two solutions are proposed:


  • 编译-nostartfiles

  • 复制的crt0.o形成4.6.X到4.7.x文件夹

这两个看起来很肮脏和不可接受的生产code。因此,没有人知道 为什么这个库中删除,什么是它现在是相当的?

Both look quite dirty and unacceptable for production code. So does anyone know why was this library removed and what is it's equivalent now?

推荐答案

的crt0.o选自crt0.s中衍生的。在裸机安装的情况下,该文件必须由实现来提供。它含有的启动和退出code,例如用于归零的.bss。

crt0.o is derived from crt0.s, which is provided by the OS. In the case of bare metal setup, this file must be provided by the implementation. It contains startup and exit code, for example for zeroing the .bss.

这篇关于什么是从背后取下gcc4.7.x的的crt0.o理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆