The entry point of a program is at
the C library where library code:
Copies non-root (RO and RW) execution regions from their load addresses to their execution addresses. Also, if any data sections are compressed, they are decompressed from the load address to the execution address.
Zeroes ZI regions.
If you do not want the library to perform these actions, you
can define your own
__main that branches
__rt_entry. For example:
IMPORT __rt_entry EXPORT __main ENTRY __main B __rt_entry END
The library function
the program as follows:
Sets up the stack and the heap by one of a number of means that include calling
__rt_stackheap_init(), or loading the absolute addresses of scatter-loaded regions.
__rt_lib_init()to initialize referenced library functions, initialize the locale and, if necessary, set up
For C++, calls the constructors for any top-level objects by way of
main(), the user-level root of the application.
main(), your program might call, among other things, library functions.
exit()with the value returned by