summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/microblaze/crti.S
diff options
context:
space:
mode:
authorSteven J. Magnani <steve@digidescorp.com>2010-11-10 19:25:30 +0100
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-10 19:44:36 +0100
commit2be86fb41e29def10eec97e5f663cc8147227358 (patch)
tree6cfefacb518c3d37786eb9b876e1fa46c8782393 /libc/sysdeps/linux/microblaze/crti.S
parent4dc998596f0ed8c9f1da6dc57a5640e3928cc12b (diff)
microblaze: Fix crt bootstrap
Rework crt bootstrap to work with the new __uClibc_main(), and hardwire crt init/fini code since the awk approach to generating it on the fly doesn't work for microblaze. The output from the gcc 4.1.2 compiler is scrambled so that the tags expected by the awk script to bracket the init/fini entry and exit code no longer do. Signed-off-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/microblaze/crti.S')
-rw-r--r--libc/sysdeps/linux/microblaze/crti.S41
1 files changed, 41 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/microblaze/crti.S b/libc/sysdeps/linux/microblaze/crti.S
new file mode 100644
index 000000000..e00396897
--- /dev/null
+++ b/libc/sysdeps/linux/microblaze/crti.S
@@ -0,0 +1,41 @@
+/*
+ * libc/sysdeps/linux/microblaze/crti.S -- init/fini entry code for microblaze
+ * (baselined with gcc 4.1.2)
+ *
+ * Copyright (C) 2010 Digital Design Corporation
+ *
+ * This file is subject to the terms and conditions of the GNU Lesser
+ * General Public License. See the file COPYING.LIB in the main
+ * directory of this archive for more details.
+ */
+
+#define END_INIT
+#define END_FINI
+#define ALIGN
+#include <libc-symbols.h>
+
+/*@HEADER_ENDS*/
+
+ .section .init
+ .align 2
+ .globl _init
+_init:
+ addik r1, r1, -32
+ swi r19, r1, 28
+ addk r19, r1, r0
+ swi r15, r1, 0
+
+ ALIGN
+ END_INIT
+
+ .section .fini
+ .align 2
+ .globl _fini
+_fini:
+ addik r1, r1, -32
+ swi r19, r1, 28
+ addk r19, r1, r0
+ swi r15, r1, 0
+
+ ALIGN
+ END_FINI