speedup collect2 (by not using it)
John David Anglin
dave@hiauly1.hia.nrc.ca
Thu May 22 22:31:00 GMT 2003
>In message <200305222040.QAA31262@makai.watson.ibm.com>, David Edelsohn writes:
> >>>>>> Mike Stump writes:
> >
> >> does collect2 ever do anything interesting when
> >> USE_COLLECT2 isn't defined and -frepo isn't given? Problem areas might
> >> be IBM (COLLECT_EXPORT_LIST). If aix is a problem, we can always do
> >> collect2 when COLLECT_EXPORT_LIST is defined.
> >
> > The GCC configuration for AIX always define use_collect2=yes
> >because it needs collect2 to build the list of constructors.
>Similarly for HPUX.
This isn't true anymore under hpux11. On the 64-bit port, we
don't use collect2. On the 32-bit port, we no longer use chatr. We
now use the LD_INIT_SWITCH and LD_FINI_SWITCH macros. This has the
advantage that constructors/destructors are automatically run when
shared libraries are loaded/unloaded. This works with dynamic loading
with shl_load. Unfortunately, we are still stuck with collect2
under hpux 10.x because the linker doesn't support the +init and
+fini options.
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
More information about the Gcc
mailing list