[Bug other/16051] Static libraries with global static initializer that have side-effect to main are removed at link
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Fri Jun 18 09:29:00 GMT 2004
------- 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
More information about the Gcc-bugs
mailing list