Annotation of dietlibc/dyn_stop.c, revision 1.7
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.7 ! sanjiyan 17: __attribute__((section(".eh_frame")))
1.6 leitner 18: __attribute_used
19: #if __WORDSIZE == 32
1.7 ! sanjiyan 20: char __FRAME_END__[4] = { 0, 0, 0, 0 };
1.6 leitner 21: #else
1.7 ! sanjiyan 22: char __FRAME_END__[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
1.6 leitner 23: #endif
24:
1.1 olaf 25: static void __do_global_ctors_aux(void)
26: {
1.3 olaf 27: structor *cf=__DTOR_END__; /* ugly trick to prevent warning */
1.1 olaf 28: for(cf=((__CTOR_END__)-1); (*cf) != (structor)-1; cf--) (*cf)();
29: }
30:
1.5 leitner 31: void _init(void) __attribute__((section(".init")));
32: __attribute__((section(".init"))) void _init(void)
1.1 olaf 33: {
34: __do_global_ctors_aux();
35: }
1.2 olaf 36: #endif
LinuxTV legacy CVS <linuxtv.org/cvs>