summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/powerpc')
-rw-r--r--libc/sysdeps/linux/powerpc/__longjmp.S2
-rw-r--r--libc/sysdeps/linux/powerpc/brk.S13
-rw-r--r--libc/sysdeps/linux/powerpc/clone.S12
-rw-r--r--libc/sysdeps/linux/powerpc/ioctl.c11
-rw-r--r--libc/sysdeps/linux/powerpc/mmap.c5
-rw-r--r--libc/sysdeps/linux/powerpc/pread_write.c35
-rw-r--r--libc/sysdeps/linux/powerpc/vfork.S15
-rw-r--r--libc/sysdeps/linux/powerpc/vfork.c5
8 files changed, 51 insertions, 47 deletions
diff --git a/libc/sysdeps/linux/powerpc/__longjmp.S b/libc/sysdeps/linux/powerpc/__longjmp.S
index 874354e5a..83f094c15 100644
--- a/libc/sysdeps/linux/powerpc/__longjmp.S
+++ b/libc/sysdeps/linux/powerpc/__longjmp.S
@@ -80,3 +80,5 @@ FP( lfd fp31,((JB_FPRS+17*2)*4)(r3))
mr r3,r4
blr
.size __longjmp,.-__longjmp
+
+libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/powerpc/brk.S b/libc/sysdeps/linux/powerpc/brk.S
index b718c0de4..bf42784cb 100644
--- a/libc/sysdeps/linux/powerpc/brk.S
+++ b/libc/sysdeps/linux/powerpc/brk.S
@@ -17,6 +17,7 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
+#include <features.h>
#include "ppc_asm.h"
#define _ERRNO_H 1
#include <bits/errno.h>
@@ -25,12 +26,11 @@
#ifdef __NR_brk
.comm __curbrk,4,4
.text
- .globl __brk
- .hidden __brk
- .type __brk,@function
+ .globl brk
+ .type brk,@function
.align 2
-__brk:
+brk:
stwu r1,-16(r1)
stw r3,8(r1)
li 0, __NR_brk;
@@ -55,8 +55,7 @@ __brk:
b __syscall_error
- .size __brk,.-__brk
+ .size brk,.-brk
- .weak brk
- brk=__brk
+libc_hidden_def(brk)
#endif
diff --git a/libc/sysdeps/linux/powerpc/clone.S b/libc/sysdeps/linux/powerpc/clone.S
index 9e8a1ca53..b5b4d17a2 100644
--- a/libc/sysdeps/linux/powerpc/clone.S
+++ b/libc/sysdeps/linux/powerpc/clone.S
@@ -30,11 +30,11 @@
int flags [r5], void *arg [r6]); */
#ifdef __NR_clone
- .globl __clone
- .type __clone,@function
+ .globl clone
+ .type clone,@function
.align 2
-__clone:
+clone:
/* Check for child_stack == NULL || fn == NULL. */
cmpwi cr0,r4,0
cmpwi cr1,r3,0
@@ -78,7 +78,7 @@ __clone:
mr r3,r31
bctrl
/* Call _exit with result from procedure. */
- b _exit_internal
+ b HIDDEN_JUMPTARGET(_exit)
.Lparent:
/* Parent. Restore registers & return. */
@@ -93,7 +93,5 @@ __clone:
b __syscall_error
- .size __clone,.-__clone
- .weak clone
- clone=__clone
+ .size clone,.-clone
#endif
diff --git a/libc/sysdeps/linux/powerpc/ioctl.c b/libc/sysdeps/linux/powerpc/ioctl.c
index bb8842bb6..211bb3b25 100644
--- a/libc/sysdeps/linux/powerpc/ioctl.c
+++ b/libc/sysdeps/linux/powerpc/ioctl.c
@@ -16,15 +16,15 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#define tcsetattr __tcsetattr
-#define tcgetattr __tcgetattr
-
#include <stdarg.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/syscall.h>
+libc_hidden_proto(tcsetattr)
+libc_hidden_proto(tcgetattr)
+
/* The user-visible size of struct termios has changed. Catch ioctl calls
using the new-style struct termios, and translate them to old-style. */
@@ -33,7 +33,7 @@ static inline
_syscall3(int, __syscall_ioctl, int, fd, unsigned long int, request, void *, arg);
-int attribute_hidden __ioctl (int fd, unsigned long int request, ...)
+int ioctl (int fd, unsigned long int request, ...)
{
void *arg;
va_list ap;
@@ -69,4 +69,5 @@ int attribute_hidden __ioctl (int fd, unsigned long int request, ...)
return result;
}
-strong_alias(__ioctl,ioctl)
+libc_hidden_proto(ioctl)
+libc_hidden_def(ioctl)
diff --git a/libc/sysdeps/linux/powerpc/mmap.c b/libc/sysdeps/linux/powerpc/mmap.c
index cac08ba65..8003c8bbc 100644
--- a/libc/sysdeps/linux/powerpc/mmap.c
+++ b/libc/sysdeps/linux/powerpc/mmap.c
@@ -10,7 +10,7 @@
return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \
(type) __sc_ret
-void attribute_hidden * __mmap(void *start, size_t length, int prot, int flags, int fd,
+void * mmap(void *start, size_t length, int prot, int flags, int fd,
off_t offset)
{
unsigned long __sc_ret, __sc_err;
@@ -45,4 +45,5 @@ void attribute_hidden * __mmap(void *start, size_t length, int prot, int flags,
__syscall_return (void *);
}
-strong_alias(__mmap,mmap)
+libc_hidden_proto(mmap)
+libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/powerpc/pread_write.c b/libc/sysdeps/linux/powerpc/pread_write.c
index 8115d4d01..1cf7f690b 100644
--- a/libc/sysdeps/linux/powerpc/pread_write.c
+++ b/libc/sysdeps/linux/powerpc/pread_write.c
@@ -33,7 +33,6 @@
# undef __USE_FILE_OFFSET64
#endif
-
#include <errno.h>
#include <sys/types.h>
#include <sys/syscall.h>
@@ -52,14 +51,14 @@ ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
return(__syscall_pread(fd, buf, count, (off64_t)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)
{
return(__syscall_pread(fd, buf, count, offset));
}
-weak_alias (__libc_pread64, pread64)
+strong_alias(__libc_pread64,pread64)
#endif /* __UCLIBC_HAS_LFS__ */
#endif /* __NR_pread */
@@ -73,20 +72,25 @@ ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
return(__syscall_pwrite(fd, buf, count, (off64_t)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)
{
return(__syscall_pwrite(fd, buf, count, offset));
}
-weak_alias (__libc_pwrite64, pwrite64)
+strong_alias(__libc_pwrite64,pwrite64)
#endif /* __UCLIBC_HAS_LFS__ */
#endif /* __NR_pwrite */
#if ! defined __NR_pread || ! defined __NR_pwrite
+libc_hidden_proto(lseek)
+libc_hidden_proto(lseek64)
+libc_hidden_proto(read)
+libc_hidden_proto(write)
+
static ssize_t __fake_pread_write(int fd, void *buf,
size_t count, off_t offset, int do_pwrite)
{
@@ -96,11 +100,11 @@ static ssize_t __fake_pread_write(int fd, void *buf,
/* Since we must not change the file pointer preserve the
* value so that we can restore it later. */
- if ((old_offset=__lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
+ if ((old_offset=lseek(fd, 0, SEEK_CUR)) == (off_t) -1)
return -1;
/* Set to wanted position. */
- if (__lseek (fd, offset, SEEK_SET) == (off_t) -1)
+ if (lseek (fd, offset, SEEK_SET) == (off_t) -1)
return -1;
if (do_pwrite==1) {
@@ -114,7 +118,7 @@ static ssize_t __fake_pread_write(int fd, void *buf,
/* Now we have to restore the position. If this fails we
* have to return this as an error. */
save_errno = errno;
- if (__lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
+ if (lseek(fd, old_offset, SEEK_SET) == (off_t) -1)
{
if (result == -1)
__set_errno(save_errno);
@@ -134,11 +138,11 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
/* Since we must not change the file pointer preserve the
* value so that we can restore it later. */
- if ((old_offset=__lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
+ if ((old_offset=lseek64(fd, 0, SEEK_CUR)) == (off64_t) -1)
return -1;
/* Set to wanted position. */
- if (__lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
+ if (lseek64(fd, offset, SEEK_SET) == (off64_t) -1)
return -1;
if (do_pwrite==1) {
@@ -151,7 +155,7 @@ static ssize_t __fake_pread_write64(int fd, void *buf,
/* Now we have to restore the position. */
save_errno = errno;
- if (__lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
+ if (lseek64 (fd, old_offset, SEEK_SET) == (off64_t) -1) {
if (result == -1)
__set_errno (save_errno);
return -1;
@@ -167,14 +171,14 @@ ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
{
return(__fake_pread_write(fd, buf, count, offset, 0));
}
-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)
{
return(__fake_pread_write64(fd, buf, count, offset, 0));
}
-weak_alias (__libc_pread64, pread64)
+strong_alias(__libc_pread64,pread64)
#endif /* __UCLIBC_HAS_LFS__ */
#endif /* ! __NR_pread */
@@ -184,14 +188,13 @@ ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
{
return(__fake_pread_write(fd, buf, count, offset, 1));
}
-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)
{
return(__fake_pread_write64(fd, (void*)buf, count, offset, 1));
}
-weak_alias (__libc_pwrite64, pwrite64)
+strong_alias(__libc_pwrite64,pwrite64)
#endif /* __UCLIBC_HAS_LFS__ */
#endif /* ! __NR_pwrite */
-
diff --git a/libc/sysdeps/linux/powerpc/vfork.S b/libc/sysdeps/linux/powerpc/vfork.S
index 7cf5eaa16..5b4bcc069 100644
--- a/libc/sysdeps/linux/powerpc/vfork.S
+++ b/libc/sysdeps/linux/powerpc/vfork.S
@@ -4,23 +4,22 @@
#ifndef __NR_vfork
/* No vfork so use fork instead */
-hidden_strong_alias(__fork,__vfork)
-weak_alias(vfork,__libc_fork)
+strong_alias(fork,vfork)
+strong_alias(vfork,__libc_fork)
#else
.text
-.global __vfork
-.hidden __vfork
-.type __vfork,@function
+.global vfork
+.type vfork,@function
.type __syscall_error,@function
-__vfork:
+vfork:
li 0, __NR_vfork
sc
bnslr+
b __syscall_error
-.size __vfork,.-__vfork
+.size vfork,.-vfork
#endif
-strong_alias(__vfork,vfork)
+libc_hidden_def(vfork)
diff --git a/libc/sysdeps/linux/powerpc/vfork.c b/libc/sysdeps/linux/powerpc/vfork.c
index 39f992513..92e9f8d63 100644
--- a/libc/sysdeps/linux/powerpc/vfork.c
+++ b/libc/sysdeps/linux/powerpc/vfork.c
@@ -9,7 +9,7 @@
return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \
(type) __sc_ret
-pid_t attribute_hidden __vfork(void)
+pid_t vfork(void)
{
unsigned long __sc_ret, __sc_err;
register unsigned long __sc_0 __asm__ ("r0");
@@ -46,4 +46,5 @@ pid_t attribute_hidden __vfork(void)
__syscall_return (pid_t);
}
-strong_alias(__vfork,vfork)
+libc_hidden_proto(vfork)
+libc_hidden_def(vfork)