home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ixemul-45.0-inc-bin.lha / include / init.h < prev    next >
C/C++ Source or Header  |  1996-10-12  |  560b  |  22 lines

  1. #ifndef _INIT_H
  2. #define _INIT_H
  3.  
  4. #ifndef __GNUC__
  5. you loose !
  6. #endif
  7.  
  8. /*
  9.  * support macros to declare and reference functions, that are automatically
  10.  * called at init/finish time. This only works with gnu-ld, and is 
  11.  * implemented with those SET_.. symbols
  12.  */
  13.  
  14. #define DEF_INIT_FUNC(fname) \
  15.     asm(".stabs \"___init_vector\", 22,0,0,_" #fname)
  16. #define REF_INIT_FUNC(fname) asm(".globl _" #fname)
  17. #define DEF_FINISH_FUNC(fname) \
  18.     asm(".stabs \"___finish_vector\", 22,0,0,_" #fname)
  19. #define REF_FINISH_FUNC(fname) asm(".globl _" #fname)
  20.  
  21. #endif /* _INIT_H */
  22.