This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Query on .cinit in EABI format with linker option -rom-model on C6670

Hi,

I have queries regarding .cinit section in EABI format with linker option -rom-mode on C6670.

---> .cinit is seems to be keep the value for global and statically explicitly initialized variable. This includes .bss,.const,.fardata
 section of the EABI format. .cinit generally not a part of EABI executable format except if I have selected -rom-model option during
 linking.

Because of the above behavior, I have seen that if I define a huge data globally and also initialized it at the time of definition than
in executable, it reserved space in .cinit and as well as one of the .bss,.const or .fardata(depends on the ways data declared) which results in
twice the size of the data space.

for e.g.

const int array[10000] = {0};

The above definition would result in increase of both .const and .cinit by (10000*4) bytes. Considering the scarcity of resources, I should see
if better utilization of resources possible. Please explain if there is a way to save this extra space except -ram-model.



Regards,
Parshant