This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/17480] collect2 on AIX calls static constructors of unreferenced object modules


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]