summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/sh
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/sh')
-rw-r--r--libc/sysdeps/linux/sh/__longjmp.S3
-rw-r--r--libc/sysdeps/linux/sh/brk.c5
-rw-r--r--libc/sysdeps/linux/sh/clone.S13
-rw-r--r--libc/sysdeps/linux/sh/longjmp.c1
-rw-r--r--libc/sysdeps/linux/sh/mmap.c6
-rw-r--r--libc/sysdeps/linux/sh/pipe.c3
-rw-r--r--libc/sysdeps/linux/sh/pread_write.c8
-rw-r--r--libc/sysdeps/linux/sh/sbrk.c7
-rw-r--r--libc/sysdeps/linux/sh/vfork.S12
9 files changed, 28 insertions, 30 deletions
diff --git a/libc/sysdeps/linux/sh/__longjmp.S b/libc/sysdeps/linux/sh/__longjmp.S
index 9e310a283..a9a7cba8a 100644
--- a/libc/sysdeps/linux/sh/__longjmp.S
+++ b/libc/sysdeps/linux/sh/__longjmp.S
@@ -61,7 +61,8 @@ __longjmp:
rts
ldc.l @r4+, gbr
#endif
-.size __longjmp,.-__longjmp;
+.size __longjmp,.-__longjmp
+libc_hidden_def(__longjmp)
.weak __sigprocmask
__sigprocmask = sigprocmask
diff --git a/libc/sysdeps/linux/sh/brk.c b/libc/sysdeps/linux/sh/brk.c
index d6063fc27..443c03b25 100644
--- a/libc/sysdeps/linux/sh/brk.c
+++ b/libc/sysdeps/linux/sh/brk.c
@@ -9,7 +9,7 @@ extern void * __curbrk;
extern int __init_brk (void);
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 +20,5 @@ int attribute_hidden __brk(void * end_data_seg)
}
return -1;
}
-strong_alias(__brk,brk)
+libc_hidden_proto(brk)
+libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/sh/clone.S b/libc/sysdeps/linux/sh/clone.S
index 7824d4771..80c623b81 100644
--- a/libc/sysdeps/linux/sh/clone.S
+++ b/libc/sysdeps/linux/sh/clone.S
@@ -38,9 +38,9 @@
.text
.align 4
-.type __clone,@function
-.globl __clone;
-__clone:
+.type clone,@function
+.globl clone;
+clone:
/* sanity check arguments. */
tst r4, r4
bt 0f
@@ -118,10 +118,7 @@ __clone:
#endif
.align 2
.L1:
- .long PLTJMP(_exit_internal)
-.size __clone,.-__clone;
-
-.globl clone;
- clone = __clone
+ .long PLTJMP( HIDDEN_JUMPTARGET(_exit))
+.size clone,.-clone;
#include "syscall_error.S"
diff --git a/libc/sysdeps/linux/sh/longjmp.c b/libc/sysdeps/linux/sh/longjmp.c
index ee3afcd74..7c729564a 100644
--- a/libc/sysdeps/linux/sh/longjmp.c
+++ b/libc/sysdeps/linux/sh/longjmp.c
@@ -25,6 +25,7 @@
#include <signal.h>
extern int __longjmp(char *env, int val);
+libc_hidden_proto(__longjmp)
/* Set the signal mask to the one specified in ENV, and jump
to the position specified in ENV, causing the setjmp
diff --git a/libc/sysdeps/linux/sh/mmap.c b/libc/sysdeps/linux/sh/mmap.c
index 5424942b6..cefc532a2 100644
--- a/libc/sysdeps/linux/sh/mmap.c
+++ b/libc/sysdeps/linux/sh/mmap.c
@@ -31,6 +31,6 @@
#include <sys/syscall.h>
-#define __NR___mmap __NR_mmap
-attribute_hidden _syscall6(__ptr_t, __mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset);
-strong_alias(__mmap,mmap)
+_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset);
+libc_hidden_proto(mmap)
+libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/sh/pipe.c b/libc/sysdeps/linux/sh/pipe.c
index a15034599..bfa54b7c9 100644
--- a/libc/sysdeps/linux/sh/pipe.c
+++ b/libc/sysdeps/linux/sh/pipe.c
@@ -5,7 +5,7 @@
#include <unistd.h>
#include <syscall.h>
-int attribute_hidden __pipe(int *fd)
+int pipe(int *fd)
{
long __res, __res2;
__asm__ __volatile__ (
@@ -27,4 +27,3 @@ int attribute_hidden __pipe(int *fd)
fd[1] = __res2;
return(0);
}
-strong_alias(__pipe,pipe)
diff --git a/libc/sysdeps/linux/sh/pread_write.c b/libc/sysdeps/linux/sh/pread_write.c
index 55b234855..23454e035 100644
--- a/libc/sysdeps/linux/sh/pread_write.c
+++ b/libc/sysdeps/linux/sh/pread_write.c
@@ -58,7 +58,7 @@ ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR((off_t)0,offset)));
}
-weak_alias (__libc_pread, pread)
+strong_alias(__libc_pread,pread)
#if defined __UCLIBC_HAS_LFS__
ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
@@ -67,7 +67,7 @@ ssize_t __libc_pread64(int fd, void *buf, size_t count, off64_t offset)
uint32_t high = offset >> 32;
return(__syscall_pread(fd, buf, count, 0, __LONG_LONG_PAIR (high, low)));
}
-weak_alias (__libc_pread64, pread64)
+strong_alias(__libc_pread64,pread64)
#endif /* __UCLIBC_HAS_LFS__ */
#endif /* __NR_pread */
@@ -91,7 +91,7 @@ ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR((off_t)0,offset)));
}
-weak_alias (__libc_pwrite, pwrite)
+strong_alias(__libc_pwrite,pwrite)
#if defined __UCLIBC_HAS_LFS__
ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
@@ -100,7 +100,7 @@ ssize_t __libc_pwrite64(int fd, const void *buf, size_t count, off64_t offset)
uint32_t high = offset >> 32;
return(__syscall_pwrite(fd, buf, count, 0, __LONG_LONG_PAIR (high, low)));
}
-weak_alias (__libc_pwrite64, pwrite64)
+strong_alias(__libc_pwrite64,pwrite64)
#endif /* __UCLIBC_HAS_LFS__ */
#endif /* __NR_pwrite */
diff --git a/libc/sysdeps/linux/sh/sbrk.c b/libc/sysdeps/linux/sh/sbrk.c
index e9faf7db0..7ccefdf58 100644
--- a/libc/sysdeps/linux/sh/sbrk.c
+++ b/libc/sysdeps/linux/sh/sbrk.c
@@ -9,8 +9,8 @@ extern void * __curbrk;
extern int __init_brk (void);
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 +23,5 @@ __sbrk(intptr_t increment)
}
return ((void *) -1);
}
-strong_alias(__sbrk,sbrk)
+libc_hidden_proto(sbrk)
+libc_hidden_def(sbrk)
diff --git a/libc/sysdeps/linux/sh/vfork.S b/libc/sysdeps/linux/sh/vfork.S
index f3c20a9d6..5c6a356e6 100644
--- a/libc/sysdeps/linux/sh/vfork.S
+++ b/libc/sysdeps/linux/sh/vfork.S
@@ -32,12 +32,11 @@
and the process ID of the new process to the old process. */
.text
-.globl __vfork
-.hidden __vfork
-.type __vfork,@function
+.globl vfork
+.type vfork,@function
.align 4
-__vfork:
+vfork:
mov.w .L2, r3
trapa #0x10
mov r0, r1
@@ -107,8 +106,7 @@ __vfork:
.L3:
.word __NR_fork
-.size __vfork, .-__vfork
-strong_alias(__vfork,vfork)
+.size vfork, .-vfork
+libc_hidden_def(vfork)
#include "syscall_error.S"
-