This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

GNU ld and -init/-fini



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

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