![Texas Instruments TMS320C2x User Manual Download Page 100](http://html1.mh-extra.com/html/texas-instruments/tms320c2x/tms320c2x_user-manual_1097073100.webp)
Controlling the Linking Process
4-9
Linking C Code
Note: The _c_int0 Symbol
One important function contained in the run-time-support library is _c_int0.
The symbol _c_int0 is the starting point in boot.obj; if you use the
−
c or
−
cr
linker option, _c_int0 is automatically defined as the entry point for the
program. If your program begins running from reset, you should set up the
reset vector to branch to _c_int0 so that the processor executes boot.obj first.
The boot.obj module contains code and data for initializing the run-time envi-
ronment. The module performs the following tasks:
1) Sets up the stack
2) Processes the run-time initialization table and autoinitializes global
variables (when using the
−
c option)
3) Calls main
4) Calls exit when main returns
Chapter 7 describes additional run-time-support functions that are included in
the library. These functions include ANSI C standard run-time support.
4.5.2 Specifying the Type of Initialization
The C compiler produces data tables for initializing global variables. Section
6.8.3,
Initialization Tables
,
on page 6-33 discusses the format of these tables.
These tables are in a named section called
.cinit
. The initialization tables are
used in one of the following ways:
-
Global variables are initialized at
run time
. Use the
−
c linker option (see
Autoinitialization of Variables at Run Time
, on page 6-34).
-
Global variables are initialized at
load time
. Use the
−
cr linker option (see
Initialization of Variables at Load Time
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...