summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/h8300
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/h8300')
-rw-r--r--libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h42
-rw-r--r--libc/sysdeps/linux/h8300/brk.c14
-rw-r--r--libc/sysdeps/linux/h8300/clone.S10
-rw-r--r--libc/sysdeps/linux/h8300/crt0.S4
-rw-r--r--libc/sysdeps/linux/h8300/pt-machine.h58
-rw-r--r--libc/sysdeps/linux/h8300/vfork.S13
6 files changed, 60 insertions, 81 deletions
diff --git a/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h b/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
new file mode 100644
index 000000000..c424d9bb6
--- /dev/null
+++ b/libc/sysdeps/linux/h8300/bits/uClibc_arch_features.h
@@ -0,0 +1,42 @@
+/*
+ * 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__ "asm instruction"*/
+#undef __UCLIBC_ABORT_INSTRUCTION__
+
+/* can your target use syscall6() for mmap ? */
+#define __UCLIBC_MMAP_HAS_6_ARGS__
+
+/* does your target use syscall4() for truncate64 ? (32bit arches only) */
+#undef __UCLIBC_MMAP_HAS_6_ARGS__
+
+/* does your target have a broken create_module() ? */
+#undef __UCLIBC_BROKEN_CREATE_MODULE__
+
+/* does your target prefix all symbols with an _ ? */
+#undef __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/h8300/brk.c b/libc/sysdeps/linux/h8300/brk.c
index d69f9a2d3..52ba1ac9c 100644
--- a/libc/sysdeps/linux/h8300/brk.c
+++ b/libc/sysdeps/linux/h8300/brk.c
@@ -1,15 +1,23 @@
/* brk on H8/300 by ysato */
+/*
+ * 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)
/* This must be initialized data because commons can't have aliases. */
+extern void *__curbrk;
+libc_hidden_proto(__curbrk)
void *__curbrk = 0;
+libc_hidden_data_def(__curbrk)
-
-int attribute_hidden __brk (void *addr)
+int brk (void *addr)
{
void *newbrk;
@@ -31,4 +39,4 @@ int attribute_hidden __brk (void *addr)
return 0;
}
-strong_alias(__brk,brk)
+libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/h8300/clone.S b/libc/sysdeps/linux/h8300/clone.S
index 7d100b6c4..554a29703 100644
--- a/libc/sysdeps/linux/h8300/clone.S
+++ b/libc/sysdeps/linux/h8300/clone.S
@@ -19,9 +19,7 @@
.text
.globl _clone
-.globl ___clone
_clone:
-___clone:
/* Sanity check arguments. */
mov.l #-EINVAL,er3
mov.l er0,er0 /* no NULL function pointers */
@@ -68,11 +66,3 @@ thread_start:
mov.l er0,er1
mov.l #__NR_exit,er0
trapa #0
-
-#if defined(__HAVE_ELF__)
- .weak clone
- clone = __clone
-#else
- .set clone,__clone
-#endif
-
diff --git a/libc/sysdeps/linux/h8300/crt0.S b/libc/sysdeps/linux/h8300/crt0.S
index a593b88e2..ebdca18e5 100644
--- a/libc/sysdeps/linux/h8300/crt0.S
+++ b/libc/sysdeps/linux/h8300/crt0.S
@@ -56,12 +56,8 @@ __exit:
*/
empty_func:
rts
-#if defined(__HAVE_ELF__)
.weak atexit
atexit = empty_func
-#else
- .set atexit,empty_func
-#endif
/* Define a symbol for the first piece of initialized data. */
diff --git a/libc/sysdeps/linux/h8300/pt-machine.h b/libc/sysdeps/linux/h8300/pt-machine.h
deleted file mode 100644
index ad83147cb..000000000
--- a/libc/sysdeps/linux/h8300/pt-machine.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* Machine-dependent pthreads configuration and inline functions.
- H8/300 version.
- Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
- Contributed by Richard Henderson <rth@tamu.edu>.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public License as
- published by the Free Software Foundation; either version 2.1 of the
- License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; see the file COPYING.LIB. If
- not, write to the Free Software Foundation, Inc.,
- 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-#ifndef _PT_MACHINE_H
-#define _PT_MACHINE_H 1
-
-#ifndef PT_EI
-# define PT_EI extern inline
-#endif
-
-extern long int testandset (int *spinlock);
-
-/* Spinlock implementation; required. */
-PT_EI long int
-testandset (int *spinlock)
-{
- char ret;
-
- __asm__ __volatile__(
- "sub.w %0,%0\n\t"
- "stc ccr,@-sp\n\t"
- "orc #0x80,ccr\n\t"
- "bld #0,@%2\n\t"
- "bset #0,@%2\n\t"
- "rotxl.w %0\n\t"
- "ldc @sp+,ccr\n\t"
- :"=r"(ret),"=m"(*spinlock)
- :"g"(spinlock)
- :"cc");
-
- return ret;
-}
-
-
-/* Get some notion of the current stack. Need not be exactly the top
- of the stack, just something somewhere in the current frame. */
-#define CURRENT_STACK_FRAME stack_pointer
-register char * stack_pointer __asm__ ("%sp");
-
-#endif /* pt-machine.h */
diff --git a/libc/sysdeps/linux/h8300/vfork.S b/libc/sysdeps/linux/h8300/vfork.S
index e101bf5ed..35c04e559 100644
--- a/libc/sysdeps/linux/h8300/vfork.S
+++ b/libc/sysdeps/linux/h8300/vfork.S
@@ -12,12 +12,11 @@
#endif
.text
.align 2
- .globl _errno
- .globl _vfork
-#if defined __HAVE_ELF__
- .type vfork,@function
-#endif
-_vfork:
+ .globl _errno
+ .globl ___vfork
+ .hidden ___vfork
+ .type ___vfork,@function
+___vfork:
mov.l @sp+, er1
sub.l er0,er0
mov.b #__NR_vfork,r0l
@@ -38,3 +37,5 @@ fix_errno:
dec.l #1,er0
jmp @er1 /* don't return, just jmp directly */
+weak_alias(__vfork,vfork)
+libc_hidden_weak(vfork)