This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug other/16051] Static libraries with global static initializer that have side-effect to main are removed at link
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jun 2004 09:29:40 -0000
- Subject: [Bug other/16051] Static libraries with global static initializer that have side-effect to main are removed at link
- References: <20040618092248.16051.nct@ysagoon.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-18 09:29 -------
Not a gcc bug at best but really not a bug at all since static library is just a big collection of .o files and
the static linker just pulls in the files which are referenced so it does not pull in the those files. Either
use a shared library or use the option to ld which says to pick up the whole archive (if there is one for
your target, the GNU binutils does have that option).
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16051