This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Display initialization order of static C++ objects in a library or program?


On Sat, Jan 9, 2016 at 1:27 PM, Jeffrey Walton <noloader@gmail.com> wrote:
> I'm trying to track down the cause of a Valgrind finding for an
> uninitialized read. I'm fairly certain it has to do with C++ static
> initialization order fiasco.
>
> How do I display initialization order of static C++ objects in a
> library or program?
>
> My apologies for a basic question. I'm having a difficult time finding
> this information.
>
> Thanks in advance.

This is by its nature platform dependent, with glibc you can get this
information by setting the environment variable LD_DEBUG=libs (the
calling init: lines), but don't expect the initialization order to
produce the same results on another platform.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]