This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with shared libraries, exceptions, and global constructors
On Tue, Aug 19, 2003 at 10:44:18AM +1000, Fergus Henderson wrote:
> The correct initialization sequence is one that initializes
> the exception handling information for all .so files before calling
> constructors of global objects in any files.
Ignore exception handling. It's a red herring. Indeed, with
a recent ld on a recent linux system exception handling doesn't
need to be initialized -- we read the data from ELF headers.
But the same problem ocurrs with any other sort of global state
that needs constructing. E.g. standard io.
> Of course the C++ standard doesn't say anything about dynamic
> linking, but it is undesirable for one feature (mutual recursion)
> to interfere with another (dynamic linking).
I'm sorry if ELF dynamic linking was not designed with your
requirements in mind.
r~
- References:
- Problem with shared libraries, exceptions, and global constructors
- Re: Problem with shared libraries, exceptions, and global constructors
- Re: Problem with shared libraries, exceptions, and global constructors
- Re: Problem with shared libraries, exceptions, and global constructors
- Re: Problem with shared libraries, exceptions, and global constructors
- Re: Problem with shared libraries, exceptions, and global constructors
- Re: Problem with shared libraries, exceptions, and global constructors