diff options
| author | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-28 00:54:02 +0000 |
|---|---|---|
| committer | "Steven J. Hill" <sjhill@realitydiluted.com> | 2006-02-28 00:54:02 +0000 |
| commit | 5eb1fae2a97ffc88d136502ace050662e57ef34a (patch) | |
| tree | df1087921ff9a88aa8a47ddfd55dc15a793fec56 /libc/sysdeps/linux/sh64 | |
| parent | dc0e95c67d350ca9e950abb5f75a63833380af9f (diff) | |
| download | uClibc-alpine-5eb1fae2a97ffc88d136502ace050662e57ef34a.tar.bz2 uClibc-alpine-5eb1fae2a97ffc88d136502ace050662e57ef34a.tar.xz | |
Merge from trunk.
Diffstat (limited to 'libc/sysdeps/linux/sh64')
| -rw-r--r-- | libc/sysdeps/linux/sh64/__init_brk.c | 6 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h | 41 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh64/brk.c | 13 | ||||
| -rw-r--r-- | libc/sysdeps/linux/sh64/sbrk.c | 10 |
4 files changed, 65 insertions, 5 deletions
diff --git a/libc/sysdeps/linux/sh64/__init_brk.c b/libc/sysdeps/linux/sh64/__init_brk.c index 92e07c49d..c14180a6c 100644 --- a/libc/sysdeps/linux/sh64/__init_brk.c +++ b/libc/sysdeps/linux/sh64/__init_brk.c @@ -4,11 +4,16 @@ #include <unistd.h> #include <sys/syscall.h> +extern void * __curbrk; +libc_hidden_proto(__curbrk) void * __curbrk = 0; +libc_hidden_data_def(__curbrk) #define __NR__brk __NR_brk attribute_hidden _syscall1(void *, _brk, void *, ptr); +extern int __init_brk (void); +libc_hidden_proto(__init_brk) int __init_brk (void) { @@ -23,3 +28,4 @@ __init_brk (void) } return 0; } +libc_hidden_def(__init_brk) diff --git a/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h b/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h new file mode 100644 index 000000000..55cd44c1f --- /dev/null +++ b/libc/sysdeps/linux/sh64/bits/uClibc_arch_features.h @@ -0,0 +1,41 @@ +/* + * Track misc arch-specific features that aren't config options + */ + +#ifndef _BITS_UCLIBC_ARCH_FEATURES_H +#define _BITS_UCLIBC_ARCH_FEATURES_H + +/* instruction used when calling abort() to kill yourself */ +#define __UCLIBC_ABORT_INSTRUCTION__ "movi 0x10, r9; shori 0xff, r9; trapa r9" + +/* can your target use syscall6() for mmap ? */ +#undef __UCLIBC_MMAP_HAS_6_ARGS__ + +/* does your target use syscall4() for truncate64 ? (32bit arches only) */ +#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__ + +/* does your target have a broken create_module() ? */ +#undef __UCLIBC_BROKEN_CREATE_MODULE__ + +/* does your target prefix all symbols with an _ ? */ +#define __UCLIBC_NO_UNDERSCORES__ + +/* does your target have an asm .set ? */ +#define __UCLIBC_HAVE_ASM_SET_DIRECTIVE__ + +/* define if target doesn't like .global */ +#undef __UCLIBC_ASM_GLOBAL_DIRECTIVE__ + +/* define if target supports .weak */ +#define __UCLIBC_HAVE_ASM_WEAK_DIRECTIVE__ + +/* define if target supports .weakext */ +#undef __UCLIBC_HAVE_ASM_WEAKEXT_DIRECTIVE__ + +/* needed probably only for ppc64 */ +#undef __UCLIBC_HAVE_ASM_GLOBAL_DOT_NAME__ + +/* define if target supports IEEE signed zero floats */ +#define __UCLIBC_HAVE_SIGNED_ZERO__ + +#endif /* _BITS_UCLIBC_ARCH_FEATURES_H */ diff --git a/libc/sysdeps/linux/sh64/brk.c b/libc/sysdeps/linux/sh64/brk.c index d6063fc27..9e33830ab 100644 --- a/libc/sysdeps/linux/sh64/brk.c +++ b/libc/sysdeps/linux/sh64/brk.c @@ -1,15 +1,24 @@ /* From libc-5.3.12 */ +/* + * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org> + * + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. + */ #include <errno.h> #include <unistd.h> #include <sys/syscall.h> +libc_hidden_proto(brk) + extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) extern void *_brk(void *ptr) attribute_hidden; -int attribute_hidden __brk(void * end_data_seg) +int brk(void * end_data_seg) { if (__init_brk () == 0) { @@ -20,4 +29,4 @@ int attribute_hidden __brk(void * end_data_seg) } return -1; } -strong_alias(__brk,brk) +libc_hidden_def(brk) diff --git a/libc/sysdeps/linux/sh64/sbrk.c b/libc/sysdeps/linux/sh64/sbrk.c index e9faf7db0..bb66f0148 100644 --- a/libc/sysdeps/linux/sh64/sbrk.c +++ b/libc/sysdeps/linux/sh64/sbrk.c @@ -4,13 +4,17 @@ #include <unistd.h> #include <sys/syscall.h> +libc_hidden_proto(sbrk) + extern void * __curbrk; +libc_hidden_proto(__curbrk) extern int __init_brk (void); +libc_hidden_proto(__init_brk) extern void *_brk(void *ptr) attribute_hidden; -void attribute_hidden * -__sbrk(intptr_t increment) +void * +sbrk(intptr_t increment) { if (__init_brk () == 0) { @@ -23,4 +27,4 @@ __sbrk(intptr_t increment) } return ((void *) -1); } -strong_alias(__sbrk,sbrk) +libc_hidden_def(sbrk) |
