Revision history   OpenPOWER Library

 6.1.3. Application start-up code

The run-time that gets control at application start-up is responsible for:

  • Creating the first stack frame.

  • Initializing the first stack frame's back chain pointer to NULL.

  • Allocating and initializing TLS storage.

  • Initializing the thread control block (TCB) and dynamic thread vector (DTV).

  • Initializing any __thread variables.

  • Setting r13 for the initial process thread.

This initialization must be completed before any library initialization codes are run and before control is transferred to the main program.

The main program must be called with the following arguments: argc, argv, envp, and auxv.