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
- From: Richard Henderson <rth at redhat dot com>
- To: Bernd Schmidt <bernds at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 18 Aug 2003 11:13:37 -0700
- Subject: Re: Problem with shared libraries, exceptions, and global constructors
- References: <Pine.LNX.4.55.0308181806540.26271@host140.cambridge.redhat.com>
On Mon, Aug 18, 2003 at 06:21:24PM +0100, Bernd Schmidt wrote:
> I've been staring at this for a while, and I can't see a good way to fix
> this. Suggestions?
Build libbug1 correctly. That is, display its dependency on libbug2:
g++ -fpic -shared bug2.cc -o libbug2.so
g++ -fpic -shared bug1.cc ./libbug2.so -o libbug1.so
That will change the DAG such that initialization happens in the
proper order.
r~