The CrossWorks C compiler separates generated code and data into sections
so that they can be individually placed by the linker. It's the linker's job
to combine, and make contiguous, sections of the same name from the input object
files.
Section summary
The default section names used by the compiler are:
-
CODE
Contains code generated for functions. Change the default code section name
using the -Rc command
line option.
-
IDATA0
Contains static initialized data. Change the default code section name using
the -Rd command line
option.
-
UDATA0
Contains static zeroed (uninitialized) data. Change the default zeroed section
name using the -Rz command
line option.
-
CONST
Contains read-only constant data. Change the default constant section name
using the -Rk command
line option.
-
INTVEC
Contains interrupt vector tables. Change the default interrupt vector section
name using the -Rv command
line option.
You can change the sections that the compiler uses for individual data objects
or functions using appropriate pragmas.