From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martin von Loewis To: gregg@eoeml.gtri.gatech.edu Cc: egcs@cygnus.com Subject: Re: Libraries and glocal constructors Date: Fri, 24 Apr 1998 23:55:00 -0000 Message-id: <199804250651.IAA00386@mira.isdn.cs.tu-berlin.de> References: <199804241607.MAA02201@nospokes.gtri.gatech.edu> X-SW-Source: 1998-04/msg01013.html > Are there any global objects in the standard library which would still > require a global constructor/destructor which would not get initialized > properly when linked with a non-C++ compiler? Whether there are global objects depends on the library. On an ELF system using GNU binutils, you can find out with objdump --headers /usr/local/lib/libstdc++.a|grep ctor Whether they would be initialized when linked with a non-C++ compiler would depend on that compiler. > Is this addressed by the standard? No. The standard talks about implementations of C++, not about implementations of some other language. Furthermore, it doesn't know the concept of a linking process, which is purely implementation-defined (except for 'linkage', but this is an issue different from 'lifetime'). > Is it library implementation dependent? Definitely. Furthermore, it also depends on the compiler, the linker, and the object file format. Regards, Martin