The answer here demonstrates that __attribute__((constructor)) is not called after static initialization, it is called in the declaration order.
Then, w
See this: http://gcc.gnu.org/ml/gcc-help/2011-05/msg00220.html and the answer http://gcc.gnu.org/ml/gcc-help/2011-05/msg00221.html
In particular quoting from the answer:
All objects with an init_priority attribute are constructed before any object with no init_priority attribute.
Note it is actually about __attribute__((init_priority))
and not about __attribute__((constructor))
but I believe they both actually use the same code in gcc, respectively in gnu linker. First just corresponds to C++ objects, i.e. calling their constructor/destructor, the latter is about marking specific functions as constructor or destructor.
IMHO, the __attribute__((constructor))
exists mainly because of C, not C++.