summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/arm/crtn.S
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/arm/crtn.S')
-rw-r--r--libc/sysdeps/linux/arm/crtn.S25
1 files changed, 21 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/arm/crtn.S b/libc/sysdeps/linux/arm/crtn.S
index 851898de0..7a1ca1ab1 100644
--- a/libc/sysdeps/linux/arm/crtn.S
+++ b/libc/sysdeps/linux/arm/crtn.S
@@ -1,17 +1,34 @@
.file "initfini.c"
.section .init
- .align 2
.global _init
.type _init, %function
- ldr pc, [sp], #4
+#if defined __thumb__
+ .align 1
+ .thumb
+ @ this will not work on ARMv4T, but lots of stuff
+ @ in here won't work there anyway...
+ pop {r4-r7, pc}
+#else
+ .align 2
+ .arm
+ ldmdb fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc}
+#endif
.size _init, .-_init
.section .fini
- .align 2
.global _fini
.type _fini, %function
- ldr pc, [sp], #4
+#if defined __thumb__
+ .align 1
+ .thumb
+ pop {r4-r7, pc}
+#else
+ .align 2
+ .arm
+ ldmdb fp, {r4, r5, r6, r7, r8, r9, sl, fp, sp, pc}
+#endif
.size _fini, .-_fini
+ @ In fact this is modified to 3.4.4
.ident "GCC: (GNU) 3.3.2 20031005 (Debian prerelease)"