4.4.3. __rt_entry

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

Implementation

__rt_entry cannot be implemented in C, because the stack has not been set up at the point this function is called. Control passes to __rt_entry after all scatter-load regions have been relocated to their execution addresses.

The default implementation of __rt_entry:

  1. Sets up the heap and stack.

  2. Initializes the C library.

  3. Calls main().

  4. Shuts down the C library.

  5. Exits.

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

exit()

To get full atexit() handling and library shut down.

__rt_exit()

To correctly shut down the library, bypassing atexit() processing.

_sys_exit()

To exit directly to the execution environment, bypassing atexit().

Copyright © 1999-2001 ARM Limited. All rights reserved.ARM DUI 0067D
Non-Confidential