GNU ld and -init/-fini
mark@codesourcery.com
mark@codesourcery.com
Thu Jul 1 00:00:00 GMT 1999
The IRIX 6 linker provdides -init and -fini switches. These switches
set DT_INIT and DT_FINI flags in the dynamic table, which cause the
named functions to be executed at initialization/finalization time.
GCC uses these to call global constructors when a shared library is
loaded.
There do not seem to be equivalent GNU ld switches. What is the
method used on Linux, etc. in order to make the same sort of thing
happen?
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com
More information about the Binutils
mailing list