X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Usermode%2FLibraries%2Fcrt0.o_src%2Farmv7-crtn.S;fp=Usermode%2FLibraries%2Fcrt0.o_src%2Farmv7-crtn.S;h=1c3e1113e82be2b18a637484f8bda441e1a9e67f;hb=845b6f9d90bb87b5e760e4d49aa93b0e003ab750;hp=0000000000000000000000000000000000000000;hpb=67a7fe2bb79eceaf10c572a99bd8345c4e81cf5b;p=tpg%2Facess2.git diff --git a/Usermode/Libraries/crt0.o_src/armv7-crtn.S b/Usermode/Libraries/crt0.o_src/armv7-crtn.S new file mode 100644 index 00000000..1c3e1113 --- /dev/null +++ b/Usermode/Libraries/crt0.o_src/armv7-crtn.S @@ -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