From 2be86fb41e29def10eec97e5f663cc8147227358 Mon Sep 17 00:00:00 2001 From: "Steven J. Magnani" Date: Wed, 10 Nov 2010 19:25:30 +0100 Subject: 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 Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/microblaze/crtn.S | 45 ++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 libc/sysdeps/linux/microblaze/crtn.S (limited to 'libc/sysdeps/linux/microblaze/crtn.S') diff --git a/libc/sysdeps/linux/microblaze/crtn.S b/libc/sysdeps/linux/microblaze/crtn.S new file mode 100644 index 000000000..da8c920ef --- /dev/null +++ b/libc/sysdeps/linux/microblaze/crtn.S @@ -0,0 +1,45 @@ +/* + * libc/sysdeps/linux/microblaze/crtn.S -- init/fini exit 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 + + .section .init + .align 2 + .globl _init + .ent _init + + lwi r15, r1, 0 + lwi r19, r1, 28 + rtsd r15, 8 + addik r1, r1, 32 # Delay slot + + .end _init +$Lfe2: + .size _init,$Lfe2-_init + + .section .fini + .align 2 + .globl _fini + .ent _fini + + lwi r15, r1, 0 + lwi r19, r1, 28 + rtsd r15, 8 + addik r1, r1, 32 # Delay slot + + .end _fini +$Lfe3: + .size _fini,$Lfe3-_fini + +/*@TRAILER_BEGINS*/ -- cgit v1.2.3