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