P
Paul Sheer
How do I find all static global objects and thereby
all initializors called before main()? The source I
work on is too large for this to be obvious. I would
like to search for *any* possible out-of-order
initializers in a large body of code.
I have tried looking at the assembly and nm output,
but it is not obvious (to me) in C++ how exactly
the linker groups all constructors into something
that would be called before main(). (assuming this
is how it works.)
Is it possible to get this information using nm,
objdump, etc. from the executable?
Note again that the source is far to large to
be able perform any kind of manual modifications
or searches.
The URL:
http://www.parashift.com/c++-faq-lite/ctors.html
explains the "static initialization order fiasco"
that I am trying to find instances of.
-paul
all initializors called before main()? The source I
work on is too large for this to be obvious. I would
like to search for *any* possible out-of-order
initializers in a large body of code.
I have tried looking at the assembly and nm output,
but it is not obvious (to me) in C++ how exactly
the linker groups all constructors into something
that would be called before main(). (assuming this
is how it works.)
Is it possible to get this information using nm,
objdump, etc. from the executable?
Note again that the source is far to large to
be able perform any kind of manual modifications
or searches.
The URL:
http://www.parashift.com/c++-faq-lite/ctors.html
explains the "static initialization order fiasco"
that I am trying to find instances of.
-paul