Annotation of dietlibc/dyn_stop.c, revision 1.3

1.2       olaf        1: #include "dietfeatures.h"
                      2: 
                      3: #ifdef WANT_DYNAMIC
1.1       olaf        4: typedef void(*structor)(void);
                      5: 
                      6: __attribute__((section(".ctors")))
                      7: static structor __CTOR_END__[1]={((structor)0)};
                      8: 
                      9: __attribute__((section(".dtors")))
                     10: static structor __DTOR_END__[1]={((structor)0)};
                     11: 
                     12: static void __do_global_ctors_aux(void)
                     13: {
1.3     ! olaf       14:   structor *cf=__DTOR_END__;   /* ugly trick to prevent warning */
1.1       olaf       15:   for(cf=((__CTOR_END__)-1); (*cf) != (structor)-1; cf--) (*cf)();
                     16: }
                     17: 
1.3     ! olaf       18: __attribute__((section(".init"))) void _init();
1.1       olaf       19: __attribute__((section(".init"))) void _init()
                     20: {
                     21:   __do_global_ctors_aux();
                     22: }
1.2       olaf       23: #endif

LinuxTV legacy CVS <linuxtv.org/cvs>