Annotation of dietlibc/dyn_stop.c, revision 1.8

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
                     29: #if __WORDSIZE == 32
1.8     ! leitner    30: EH_FRAME_SECTION_CONST char __FRAME_END__[4] = { 0, 0, 0, 0 };
1.6       leitner    31: #else
1.8     ! leitner    32: EH_FRAME_SECTION_CONST char __FRAME_END__[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
1.6       leitner    33: #endif
                     34: 
1.1       olaf       35: static void __do_global_ctors_aux(void)
                     36: {
1.3       olaf       37:   structor *cf=__DTOR_END__;   /* ugly trick to prevent warning */
1.1       olaf       38:   for(cf=((__CTOR_END__)-1); (*cf) != (structor)-1; cf--) (*cf)();
                     39: }
                     40: 
1.5       leitner    41: void _init(void) __attribute__((section(".init")));
                     42: __attribute__((section(".init"))) void _init(void)
1.1       olaf       43: {
                     44:   __do_global_ctors_aux();
                     45: }
1.2       olaf       46: #endif

LinuxTV legacy CVS <linuxtv.org/cvs>