X-Git-Url: https://oss.titaniummirror.com/gitweb?a=blobdiff_plain;f=src%2Fstdlib%2F__do_global_dtors.S;fp=src%2Fstdlib%2F__do_global_dtors.S;h=a27c5fb493b0f0ecba73d1bf78b1e4d0bacfb54d;hb=6f720ff00773571c2fa2d35e67bff68547617639;hp=0000000000000000000000000000000000000000;hpb=807b2dd5b7365eb87b482197af3b4a3f520c14f7;p=msp430-libc.git diff --git a/src/stdlib/__do_global_dtors.S b/src/stdlib/__do_global_dtors.S new file mode 100644 index 0000000..a27c5fb --- /dev/null +++ b/src/stdlib/__do_global_dtors.S @@ -0,0 +1,19 @@ +#include "../core_common.inc" +/***************************************************************** + * Call C++ global and static objects destructors + * can be overwriten by user function with the same name + *****************************************************************/ + .section .fini6,"ax",@progbits + + .weak __do_global_dtors + .func __do_global_dtors + +__do_global_dtors: + XMOVA #__dtors_start, r11 + XMOVA #__dtors_end, r10 +.L__dtors_loop: + XCALL @r11+ + XCMP r10, r11 + jne .L__dtors_loop + + .endfunc