This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17480] collect2 on AIX calls static constructors of unreferenced object modules
- From: "harcoh at ATConsultancy dot nl" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Sep 2004 07:32:55 -0000
- Subject: [Bug c++/17480] collect2 on AIX calls static constructors of unreferenced object modules
- References: <20040914152828.17480.harco.de.hilster@ATConsultancy.nl>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From harcoh at ATConsultancy dot nl 2004-09-15 07:32 -------
Subject: Re: collect2 on AIX calls static constructors of
unreferenced object modules
pinskia at gcc dot gnu dot org wrote:
>------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-14 16:26 -------
>Technically this is not a bug, as static libraries on AIX also can contain the shared library so I am going
>to close this as invalid.
>
>
>
Hi,
Thanks for your response, but I'am not very satisfied with the answer ;-(.
I was astonished to find that something so basic in c++ as the
initialization of static objects is not consistant
across platforms. It's not just a matter of huge libraires, but
initialization code that is run unintentionaly might do
wrong things.
If on AIX static constructors are called on all objects and libraries on
the link line, and on all (most?) other platforms not,
than that is a bug in my opinion.
What is wrong with linking first, and then adding calls to static
constructors? Unreferenced code will not be included and the
behaviour will be indentical to other platforms.
Kind regards,
Harco
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17480