]> oss.titaniummirror.com Git - msp430-libc.git/blobdiff - src/stdlib/__do_global_dtors.S
Imported msp430-libc-20100207
[msp430-libc.git] / src / stdlib / __do_global_dtors.S
diff --git a/src/stdlib/__do_global_dtors.S b/src/stdlib/__do_global_dtors.S
new file mode 100644 (file)
index 0000000..a27c5fb
--- /dev/null
@@ -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