Mail Archives: djgpp/1997/07/30/09:56:05
On Sun, 27 Jul 1997, Darren Grant wrote:
> Hello,
>
> How do I link my own extra entry/exit code into a c project?
The function atexit() will let you define a hierarchy of functions to
execute when the program is exiting either through return from main() or
a call to exit() (the _exit() function skips atexit processing).
For entry code you will either have to live with executing stuff at the
beginning of main() or write a custom verstion of crt0.o the startup
module.
Art S. Kagel, kagel AT bloomberg DOT com
- Raw text -