4.23 __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-loaded regions have been relocated to their execution addresses.


The default implementation of __rt_entry:

  1. Performs hardware initialization by calling _platform_pre_stackheap_init(), if this function is defined.
  2. Sets up the heap and stack.
  3. Initializes the C library by calling __rt_lib_init.
  4. Calls main().
  5. Shuts down the C library, by calling __rt_lib_shutdown.
  6. Exits.

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

Calls atexit()-registered functions and shuts down the library.
Shuts down the library but does not call atexit() functions.
Exits directly to the execution environment. It does not shut down the library and does not call atexit() functions.
Non-ConfidentialPDF file icon PDF versionARM 100073_0607_00_en
Copyright © 2014–2017 ARM Limited or its affiliates. All rights reserved.