Annotation of dietlibc/dyn_stop.c, revision 1.9

1.2       olaf        1: #include "dietfeatures.h"
                      2: 
                      3: #ifdef WANT_DYNAMIC
1.6       leitner     4: #include <sys/cdefs.h>
                      5: #include <endian.h>
                      6: 
1.1       olaf        7: typedef void(*structor)(void);
                      8: 
                      9: __attribute__((section(".ctors")))
1.6       leitner    10: __attribute_used
1.1       olaf       11: static structor __CTOR_END__[1]={((structor)0)};
                     12: 
                     13: __attribute__((section(".dtors")))
1.6       leitner    14: __attribute_used
1.1       olaf       15: static structor __DTOR_END__[1]={((structor)0)};
                     16: 
1.8       leitner    17: /* see gcc-3.4/gcc/crtstuff.c */
                     18: #if !defined(EH_FRAME_SECTION_CONST)
                     19: #if defined(__s390__) || defined(__x86_64__)
                     20: # define EH_FRAME_SECTION_CONST const
                     21: #endif
                     22: #endif
                     23: #if !defined(EH_FRAME_SECTION_CONST)
                     24: # define EH_FRAME_SECTION_CONST
                     25: #endif
                     26: 
1.7       sanjiyan   27: __attribute__((section(".eh_frame")))
1.6       leitner    28: __attribute_used
1.9     ! sanjiyan   29: static
1.6       leitner    30: #if __WORDSIZE == 32
1.8       leitner    31: EH_FRAME_SECTION_CONST char __FRAME_END__[4] = { 0, 0, 0, 0 };
1.6       leitner    32: #else
1.8       leitner    33: EH_FRAME_SECTION_CONST char __FRAME_END__[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
1.6       leitner    34: #endif
                     35: 
1.1       olaf       36: static void __do_global_ctors_aux(void)
                     37: {
1.3       olaf       38:   structor *cf=__DTOR_END__;   /* ugly trick to prevent warning */
1.1       olaf       39:   for(cf=((__CTOR_END__)-1); (*cf) != (structor)-1; cf--) (*cf)();
                     40: }
                     41: 
1.5       leitner    42: void _init(void) __attribute__((section(".init")));
                     43: __attribute__((section(".init"))) void _init(void)
1.1       olaf       44: {
                     45:   __do_global_ctors_aux();
                     46: }
1.2       olaf       47: #endif

LinuxTV legacy CVS <linuxtv.org/cvs>