From 60e244a98fbaa4c8637dd1c3147979633e5179aa Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Sun, 28 Jun 2009 23:48:09 +0000 Subject: Add missing CLIBABI variables __aeabi_stdin, __aeabi_stdout, __aeabi_stderr. The ARM EABI has a document CLIBABI specifying various __aeabi_* functions and variables to be provided for the use of portable objects that can be linked with different EABI-conforming C libraries. __aeabi_stdin, __aeabi_stdout and __aeabi_stderr were missing in uClibc; this patch (originally from Nathan Froyd and for glibc) adds them. Signed-off-by: Joseph Myers --- libc/sysdeps/linux/arm/aeabi_lcsts.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/arm/aeabi_lcsts.c b/libc/sysdeps/linux/arm/aeabi_lcsts.c index 99c79851e..0c620d4fe 100644 --- a/libc/sysdeps/linux/arm/aeabi_lcsts.c +++ b/libc/sysdeps/linux/arm/aeabi_lcsts.c @@ -81,4 +81,19 @@ eabi_constant (TMP_MAX); eabi_constant (FILENAME_MAX); eabi_constant (L_tmpnam); +FILE *__aeabi_stdin attribute_hidden; +FILE *__aeabi_stdout attribute_hidden; +FILE *__aeabi_stderr attribute_hidden; + +static void __attribute__ ((used)) +setup_aeabi_stdio (void) +{ + __aeabi_stdin = stdin; + __aeabi_stdout = stdout; + __aeabi_stderr = stderr; +} + +static void (*fp) (void) __attribute__ ((used, section (".preinit_array"))) + = setup_aeabi_stdio; + eabi_constant (CLOCKS_PER_SEC); -- cgit v1.2.3 From 77c075f4ea2d9a625f35292063bd627e2e8fdf10 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 30 Jun 2009 21:20:26 +0000 Subject: Fix Thumb-2 setjmp. Many Thumb-2 instructions cannot use sp or pc as operands, and the assembler now diagnoses these. setjmp had one such instruction, movs; this patch changes it to mov. Signed-off-by: Joseph Myers --- libc/sysdeps/linux/arm/setjmp.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/arm/setjmp.S b/libc/sysdeps/linux/arm/setjmp.S index 2df7d551a..76d179043 100644 --- a/libc/sysdeps/linux/arm/setjmp.S +++ b/libc/sysdeps/linux/arm/setjmp.S @@ -47,7 +47,7 @@ __sigsetjmp: mov ip, r0 #if defined(__thumb2__) stmia ip!, {v1-v6, sl, fp} - movs r2, sp + mov r2, sp stmia ip!, {r2, lr} #else /* Save registers */ -- cgit v1.2.3 From a98934adc9277d1dea52b929d59c6b15ccf115a2 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Thu, 2 Jul 2009 11:02:13 +0200 Subject: sh: add cacheflush syscall wrapper Signed-off-by: Giuseppe Cavallaro Signed-off-by: Carmelo Amoroso --- libc/sysdeps/linux/sh/Makefile.arch | 2 +- libc/sysdeps/linux/sh/cacheflush.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 libc/sysdeps/linux/sh/cacheflush.c (limited to 'libc/sysdeps') diff --git a/libc/sysdeps/linux/sh/Makefile.arch b/libc/sysdeps/linux/sh/Makefile.arch index 77ad570d6..2c69f59b8 100644 --- a/libc/sysdeps/linux/sh/Makefile.arch +++ b/libc/sysdeps/linux/sh/Makefile.arch @@ -7,7 +7,7 @@ # CSRC := \ - mmap.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c + mmap.c pipe.c __init_brk.c brk.c sbrk.c syscall.c pread_write.c cacheflush.c SSRC := setjmp.S __longjmp.S vfork.S clone.S ___fpscr_values.S diff --git a/libc/sysdeps/linux/sh/cacheflush.c b/libc/sysdeps/linux/sh/cacheflush.c new file mode 100644 index 000000000..58229186d --- /dev/null +++ b/libc/sysdeps/linux/sh/cacheflush.c @@ -0,0 +1,15 @@ +/* + * cacheflush syscall for SUPERH + * + * Copyright (C) 2009 STMicroelectronics Ltd + * Author: Giuseppe Cavallaro + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ +#include +#include +#include + +#ifdef __NR_cacheflush +_syscall3(int, cacheflush, char *, addr, int, nbytes, int, op) +#endif -- cgit v1.2.3