__rt_entry, __rt_exit(), __rt_lib_init(), __rt_lib_shutdown(), --strict, --no_strict

本文详细介绍了ARM C库的关键函数,包括`__rt_entry`、`__rt_exit()`、`__rt_lib_init()`和`__rt_lib_shutdown()`。这些函数在程序启动、初始化、异常处理和退出过程中起着重要作用。`--strict`和`--no_strict`选项则分别用于强制执行或放宽对ISO C和C++标准的遵守。
摘要由CSDN通过智能技术生成

  2.5.2 __rt_entry

The symbol __rt_entry is the starting point for a program using the ARM C library.

Control passes to __rt_entry after all scatter-load regions have been relocated to their

execution addresses.

Usage

The default implementation of __rt_entry :

1. Sets up the heap and stack.

2. Initializes the C library, by calling __rt_lib_init .

3. Calls main() .

4. Shuts down the C library, by calling __rt_lib_shutdown .

5. Exits.

__rt_entry must end with a call to one of the following functions:

exit() Calls atexit()- registered functions and shuts down the library.

__rt_exit() Shuts down the library but does not call atexit() functions.

_sys_exit() Exits directly to the execution environment. It does not shut down the

library and does not call atexit() functions. See _sys_exit() on

page 2-60.

2.5.3 Exiting from the program

The program can exit normally at the end of main() or it can exit prematurely because

of an error.

Exiting from an assert

The behavior of the assert macro depends on the conditions in operation at the most

recent occurrence of #include <assert.h> :

1. If the NDEBUG macro

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值