ARM Technical Support Knowledge Articles

CONTENTS OF THE ?C_INITSEG SEGMENT

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

What 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?

ANSWER

The ?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

Article last edited on: 2005-07-15 14:07:29

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential