https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83211

            Bug ID: 83211
           Summary: Warning: ignoring incorrect section type for
                    .init_array.00200
           Product: gcc
           Version: 6.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rdiezmail-gcc at yahoo dot de
  Target Milestone: ---

I recently upgraded my embedded ARM Cortex-M4 toolchain from GCC 6.3 to GCC
6.4, and Binutils from 2.28 to 2.29.1 (among other minor component upgrades).

My C++ code is using the following for a static routine:

  __attribute__ ((constructor (200)))

After the upgrade I am getting this warning now:

  /tmp/cc79zoMV.s: Assembler messages:
  /tmp/cc79zoMV.s:5079: Warning: ignoring incorrect section type for
.init_array.00200
  /tmp/cc79zoMV.s:5112: Warning: ignoring incorrect section type for
.fini_array.00200


Normally, GCC emits this kind of section statements during compilation:

.section        .init_array,"aw",%init_array

But for the "__attribute__ ((constructor (200)))" code, it emits this instead:

.section        .init_array.00200,"aw",%progbits

Binutils saw this change recently:

https://sourceware.org/bugzilla/show_bug.cgi?id=21287

So I am guessing that is what is causing the new warning.

I suppose that GCC needs an update to match that Binutils change.

Reply via email to