Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Libraries / crt0.o_src / armv7-crtn.S
diff --git a/Usermode/Libraries/crt0.o_src/armv7-crtn.S b/Usermode/Libraries/crt0.o_src/armv7-crtn.S
new file mode 100644 (file)
index 0000000..1c3e111
--- /dev/null
@@ -0,0 +1,41 @@
+.section .init
+       /* gcc will nicely put the contents of crtend.o's .init section here. */
+#ifdef __thumb__
+       .thumb
+       
+       pop     {r3, r4, r5, r6, r7}
+       pop     {r3}
+       mov     lr, r3
+#else
+       .arm
+       
+       sub     sp, fp, #40
+       ldmfd   sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
+#endif
+       
+#if defined __THUMB_INTERWORK__ || defined __thumb__
+       bx      lr
+#else
+       mov     pc, lr
+#endif
+
+.section .fini
+       /* gcc will nicely put the contents of crtend.o's .fini section here. */
+#ifdef __thumb__
+       .thumb
+       
+       pop     {r3, r4, r5, r6, r7}
+       pop     {r3}
+       mov     lr, r3
+#else
+       .arm
+       
+       sub     sp, fp, #40
+       ldmfd   sp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, lr}
+#endif
+       
+#if defined __THUMB_INTERWORK__ || defined __thumb__
+       bx      lr
+#else
+       mov     pc, lr
+#endif

UCC git Repository :: git.ucc.asn.au