ARM Technical Support Knowledge Articles

WARNING L16 (UNCALLED SEGMENT) ?C_INITSEG

Applies to: BL51 Code-banking Linker/Locator

Answer


Information in this article applies to:


QUESTION

I have written my own startup sequence, but now I keep getting the following linker warning:

*** WARNING L16: UNCALLED SEGMENT, IGNORED FOR OVERLAY PROCESS
    SEGMENT: ?C_INITSEG

What is the problem?

ANSWER

The uncalled segment, ?C_INITSEG, is the name given to the global variable initialization code. This segment is automatically included when a program with initialized global or static variables. For example:

int i = 5;   // this generates an INITSEG table entry

int test (void)  {
  return (i);
}

RAM variable initializations generate table entries in the ?C_INITSEG segment. ?C_INITSEG is called at the end of the startup code to initialize global variables. Then, the main C function is invoked.

It seems that the ?C_INITSEG segment was included in the program linkage but was never invoked. There are several ways to solve this problem:

  1. If you use modified STARTUP code, make sure that you call ?C_START at the end of the CPU initialization. This executes the function that reads the ?C_INITSEG and then calls main. Source code for this function is provided in the file INIT.A51.
  2. You may use a separate function that initializes all your variables. For example:
    void init (void)  {
      i = 5;
    }
    

MORE INFORMATION

SEE ALSO

Article last edited on: 2007-11-16 15:33:13

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