09212024

Last update2016/05/28 14:38

Back 現在地: Home パートナー SCIOPTA パートナー Atollic 4.“Do not use standard Start-files”とは?

4.“Do not use standard Start-files”とは?

4.“Do not use standard Start-files”とは?

What is the meaning of the check-box "Do not use standard start files", found in Build settings and selects Tool Settings > C Linker > General?

This check-box gives user two options to execute user-defined code before entering main, instead of modifying the Reset-handler. Both are triggered by the libc_init_array call in the startup code.

Option1: Constructors for objects or constructor functions are placed in a list called .init_array. These functions are then executed one by one by the libc_init_array.

Option2: Add code to a .init section. libc_init_array will run the _init function which will execute all instructions added to the .init section. The crti and crtn contains the start and end of the _init function.