Merge branch 'master' of git://git.ucc.asn.au/tpg/acess2
[tpg/acess2.git] / Usermode / Libraries / crt0.o_src / armv7-crti.S
diff --git a/Usermode/Libraries/crt0.o_src/armv7-crti.S b/Usermode/Libraries/crt0.o_src/armv7-crti.S
new file mode 100644 (file)
index 0000000..310cd6a
--- /dev/null
@@ -0,0 +1,31 @@
+.section .init
+.global _init
+.type _init, function
+_init:
+#ifdef __thumb__
+       .thumb
+       
+       push    {r3, r4, r5, r6, r7, lr}
+#else
+       .arm
+       mov     ip, sp
+       stmdb   sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
+       sub     fp, ip, #4
+#endif
+       /* gcc will nicely put the contents of crtbegin.o's .init section here. */
+
+.section .fini
+.global _fini
+.type _fini, function
+_fini:
+#ifdef __thumb__
+       .thumb
+       
+       push    {r3, r4, r5, r6, r7, lr}
+#else
+       .arm
+       mov     ip, sp
+       stmdb   sp!, {r3, r4, r5, r6, r7, r8, r9, sl, fp, ip, lr, pc}
+       sub     fp, ip, #4
+#endif
+       /* gcc will nicely put the contents of crtbegin.o's .fini section here. */

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