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.

Cortex M3 4.6.1 linker warning #10277-D

        .cinit
        {
            *(.cinit)
        } run > APP_RUN load > APP_LOAD

generates

".\os\linker.cmd", line 263: warning #10277-D: CINIT output section ".cinit"
   cannot be collected with section specifier, specifier ignored

What does it mean? The same warning is produced in .cinit is the part of the GROUP.

There is also discontinuity in .cinit allocation

.app_vect
*          0    fd000000    000000e4     RUN ADDR = 00000000
                  fd000000    000000e4     exception_vectors.obj (.app_vect)

$fill000   0    fd0000e4    00000004    
                  fd0000e4    00000004     --HOLE-- [fill = ffffffff]

.app_hdr   0    fd0000e8    00000080     RUN ADDR = 000000e8
                  fd0000e8    00000080     section_header_cfg.obj (.app_hdr)

.cinit     0    fd000168    00000068     RUN ADDR = 00000180
                  fd000168    0000001d     (.cinit..data.load) [load image, compression = rle]
                  fd000185    00000003     --HOLE-- [fill = ffffffff]
                  fd000188    0000000c     (__TI_handler_table)

.cinit should start at 0x00000168 rather than at 0x00000180. Can this be explained?

Thanks,

Eugene

  • I got the root cause of the discontinuity in .cinit allocation. This was the result of missing allocation specification for .data section. The first question regarding warning #10277-D still stands. I'd appreciate any help with it.

    Thanks,

    Eugene

  • The .cinit section is one of several special linker-generated output sections.  The linker knows it is illegal to mix any other kind of input section into the .cinit output section, so it forbids the user from providing any section specifier whatsoever.  It doesn't check to see if the section specifier happens to be exactly what it would have done anyway, which is the case in your example.  Delete the input section specifier, you'll get the same behavior and you'll eliminate the warning.

  • Thanks. It worked.

    Eugene