Date: Wed, 9 Apr 1997 12:14:32 -0700 (PDT) From: John Polstra <jdp> To: CVS-committers, cvs-all, cvs-lib Subject: cvs commit: src/lib/csu/i386 c++rt0.c Message-ID: <199704091914.MAA09586@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jdp 97/04/09 12:14:32 Modified: lib/csu/i386 c++rt0.c Log: Declare the constructor/destructor linker sets as extern rather than common. Add one do-nothing element to each set. This ensures that the linker realizes that they are linker sets rather than simple commons, and makes it possible to link c++rt0.o into every shared library regardless of whether it is a C++ library or not. Without this change, the constructors and destructors in the main program could be executed multiple times. This change is going to make it possible to get rid of the CPLUSPLUSLIB makefile variable once and for all. It is a piece of the solution to PR gnu/3505 (gcc -shared). Finally, it fixes a heretofore unreported bug: If CPLUSPLUSLIB was set in a makefile for a C++ shared library that had no static constructors or destructors in it, then the main program's constructors and destructors would be executed multiple times. Revision Changes Path 1.8 +24 -3 src/lib/csu/i386/c++rt0.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704091914.MAA09586>