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.

ARM Compiler 5.0.5 does not recognize .sect

Hi,

I use the ARM Compiler V5.0.5. I want to have two initialized sections in the file "test.asm" and I write the following:

.sect ".image_endtoken"
.word 0AB73h

.sect ".text_SRAM"
...

The input section .text_SRAM gets recognized by the compiler but .image_endtoken is not.
The linker tells me "warning #10068-D: no matching section" when I try to map the input section:

.image_endtoken : {test.obj (.image_endtoken)}

What is wrong?

Best regards,
Patrick

  • I see no errors in what you show so far.  I suspect the error is due to something else you are doing.  Please submit a test case which, upon building, shows that diagnostic.

    Thanks and regards,

    -George

  • You must have whitespace before every directive (.sect, .word).  Does your test case have this required whitespace?

  • Hi,

    Yes, the test case has this required whitespaces.

    Actually I do know what the cause of the problem was: In the ARM Linker there is a option called
    "--unused_section_elimination" (linktime optimization). This option was empty in the project. Therefore the default value was taken. And the default value is "on". That means the linker did not see any use of the declared value and did eliminate the section.

    As we worked with the C2000 family, this option was new to me. Actually a bit strange that as per default the linker eliminates unused sections. Took quite some time to find that out.

    Maybe this helps other users.

    Regards,
    Patrick