Global constructor call not in .init_array section
<p>I'm trying to add global constructor support on an embedded target (ARM Cortex-M3).
Lets say I've the following code:</p>

<pre><code>class foobar
{
    int i;

public:
    foobar()
    {
        i = 100;
    }

    void inc()
    {
        i++;
    }
};

foobar foo;

int main()
{
    foo.inc();
    for (;;);
}
</code></pre>

<p>I compile it like this:</p>

<pre><code>arm-none-eabi-g++ -O0 -gdwarf-2 -mcpu=cortex-m3 -mthumb -c foo.cpp -o foo.o
</code></pre>

<p>When I look at the .init_array section with objdump it shows the .init_section has a zero size.</p>

<p>I do get an symbol named <code>_Z41__static_initialization_and_destruction_0ii</code>.
When I disassemble the object file I see that the global construction is done in the static_initialization_and_destruction symbol.</p>

<p>Why isn't a pointer added to this symbol in the .init_section?</p>
