This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/33704] AIX runs c++ constructors in incorrect order
- From: "ajd at gentrack dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Oct 2007 21:44:58 -0000
- Subject: [Bug target/33704] AIX runs c++ constructors in incorrect order
- References: <bug-33704-8038@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #15 from ajd at gentrack dot com 2007-10-09 21:44 -------
(In reply to comment #14)
> You seem to want to have the main program run the share library constructors.
> That's a no-no. And decide at link-time. Double no-no.
Do you mind explaining a situation that won't work because of this?
The the following work should work as -binitfini is still used:
- LDR_PRELOAD
- libraries loaded by dlopen at runtime
- executables linked by xlc loading libraries compiled by gcc
If main was directly linked against lib1.a:
- lib1.a can add/remove dependencies against other libraries.
- lib1.a can change it's constructors.
- lib1.a can be resolved to a completely different library as long as the
replacement contains __GLOBAL__FI_lib1.
The two situations I can identify that won't work are if the replacement lib1.a
was renamed or was compiled by xlc. I can look at resolving these if they're
the only problems.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33704