| |||||
Technical Support Support Resources
Product Information | C51: CONTENTS OF THE ?C_INITSEG SEGMENTInformation in this article applies to:
QUESTIONWhat is the content of segment ?C_INITSEG? In the linker MAP file I have found a segment named ?C_INITSEG. Why is this segment generated and what is the use of this segment? ANSWERThe ?C_INITSEG segment contains variable initialization information for variables in the memory areas data, idata, pdata, xdata, and far. Entries in this segment are generated when you write C statements like:
int i = 0x1000;
void main (void) {
}
The contents of the ?C_INITSEG table is used in the INIT.A51 code that runs after the STARTUP.A51 code. Variable initializations for the memory areas code and far const are directly inserted into the ROM image and do not require an entry in the ?C_INITSEG segment. The same is true for the memory type xdata when you are using the XCROM directive. XCROM directs the compiler to store const xdata variables directly in ROM and suppresses the initialization table entry. MORE INFORMATION
SEE ALSO
Last Reviewed: Friday, July 15, 2005 | ||||
| |||||