SPRU513Y August 2001 – June 2022 SM320F28335-EP
The C and C++ standards require that global and static variables that are not explicitly initialized must be set to 0 before program execution. The C/C++ compiler supports preinitialization of uninitialized variables by default. To turn this off, specify the linker option --zero_init=off. COFF ABI does not support zero initialization.
The syntax for the --zero_init option is:
--zero_init[={on|off}]
Zero initialization takes place only if the --rom_model linker option, which causes autoinitialization to occur, is used. If you use the --ram_model option for linking, the linker does not generate initialization records, and the loader must handle both data and zero initialization.