summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/arm/ioperm.c3
-rw-r--r--libc/sysdeps/linux/arm/mmap64.S6
-rw-r--r--libc/sysdeps/linux/arm/sigaction.c8
-rw-r--r--libc/sysdeps/linux/frv/mmap.c3
-rw-r--r--libc/sysdeps/linux/i386/mmap.S11
-rw-r--r--libc/sysdeps/linux/i386/sigaction.c8
-rw-r--r--libc/sysdeps/linux/mips/mmap.c4
-rw-r--r--libc/sysdeps/linux/powerpc/ioctl.c4
-rw-r--r--libc/sysdeps/linux/powerpc/mmap.c4
-rw-r--r--libc/sysdeps/linux/sh/mmap.c4
-rw-r--r--libc/sysdeps/linux/sh/pipe.c5
-rw-r--r--libc/sysdeps/linux/x86_64/mmap.c4
-rw-r--r--libc/sysdeps/linux/x86_64/sigaction.c12
13 files changed, 43 insertions, 33 deletions
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c
index d69d475d6..837de8adf 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/ioperm.c
@@ -34,6 +34,9 @@
enable all the ports all of the time. */
#define readlink __readlink
+#define mmap __mmap
+#define sscanf __sscanf
+#define fscanf __fscanf
#include <errno.h>
#include <fcntl.h>
diff --git a/libc/sysdeps/linux/arm/mmap64.S b/libc/sysdeps/linux/arm/mmap64.S
index 63b02f9df..dd6f3c477 100644
--- a/libc/sysdeps/linux/arm/mmap64.S
+++ b/libc/sysdeps/linux/arm/mmap64.S
@@ -52,11 +52,7 @@ mmap64:
mov r0, ip @ first arg was clobbered
teq r5, $0
ldmeqfd sp!, {r4, r5, lr}
-#ifdef __PIC__
- beq mmap(PLT)
-#else
- beq mmap
-#endif
+ beq __mmap
.Linval:
mov r0, $-EINVAL
ldmfd sp!, {r4, r5, lr}
diff --git a/libc/sysdeps/linux/arm/sigaction.c b/libc/sysdeps/linux/arm/sigaction.c
index e2da4f87c..a2d27eb5a 100644
--- a/libc/sysdeps/linux/arm/sigaction.c
+++ b/libc/sysdeps/linux/arm/sigaction.c
@@ -46,7 +46,7 @@ extern void __default_rt_sa_restorer(void);
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
@@ -94,7 +94,7 @@ int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act,
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct old_kernel_sigaction kact, koact;
@@ -127,6 +127,6 @@ int __sigaction_internal (int sig, const struct sigaction *act, struct sigaction
}
#endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal, sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
diff --git a/libc/sysdeps/linux/frv/mmap.c b/libc/sysdeps/linux/frv/mmap.c
index b3fd7c3d8..fa801bb5f 100644
--- a/libc/sysdeps/linux/frv/mmap.c
+++ b/libc/sysdeps/linux/frv/mmap.c
@@ -38,7 +38,7 @@ static inline _syscall6(__ptr_t, __syscall_mmap2, __ptr_t, addr,
# define MMAP2_PAGE_SHIFT 12
# endif
-__ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
+__ptr_t attribute_hidden __mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offset)
{
if (offset & ((1 << MMAP2_PAGE_SHIFT) - 1)) {
__set_errno (EINVAL);
@@ -46,3 +46,4 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, __off_t offs
}
return(__syscall_mmap2(addr, len, prot, flags, fd, (off_t) (offset >> MMAP2_PAGE_SHIFT)));
}
+strong_alias(__mmap,mmap)
diff --git a/libc/sysdeps/linux/i386/mmap.S b/libc/sysdeps/linux/i386/mmap.S
index 5dde939bf..4c4723dff 100644
--- a/libc/sysdeps/linux/i386/mmap.S
+++ b/libc/sysdeps/linux/i386/mmap.S
@@ -21,10 +21,13 @@
#include <bits/errno.h>
#include <sys/syscall.h>
-.text
.global mmap
-.type mmap,%function
-mmap:
+.set mmap,__mmap
+.text
+.global __mmap
+.hidden __mmap
+.type __mmap,%function
+__mmap:
/* Save registers. */
movl %ebx, %edx
@@ -46,4 +49,4 @@ mmap:
/* Successful; return the syscall's value. */
ret
-.size mmap,.-mmap
+.size __mmap,.-__mmap
diff --git a/libc/sysdeps/linux/i386/sigaction.c b/libc/sysdeps/linux/i386/sigaction.c
index d7898c598..2e50284b2 100644
--- a/libc/sysdeps/linux/i386/sigaction.c
+++ b/libc/sysdeps/linux/i386/sigaction.c
@@ -34,7 +34,7 @@ extern void restore (void) asm ("__restore") attribute_hidden;
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
@@ -76,7 +76,7 @@ extern void restore (void) asm ("__restore") attribute_hidden;
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct old_kernel_sigaction kact, koact;
@@ -119,8 +119,8 @@ int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act,
}
#endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal, sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
diff --git a/libc/sysdeps/linux/mips/mmap.c b/libc/sysdeps/linux/mips/mmap.c
index c6af2efd2..25a3ef5bd 100644
--- a/libc/sysdeps/linux/mips/mmap.c
+++ b/libc/sysdeps/linux/mips/mmap.c
@@ -14,5 +14,7 @@
#endif
#endif
-_syscall6 (__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot,
+#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)
diff --git a/libc/sysdeps/linux/powerpc/ioctl.c b/libc/sysdeps/linux/powerpc/ioctl.c
index a522ff6d4..bb8842bb6 100644
--- a/libc/sysdeps/linux/powerpc/ioctl.c
+++ b/libc/sysdeps/linux/powerpc/ioctl.c
@@ -29,10 +29,11 @@
using the new-style struct termios, and translate them to old-style. */
#define __NR___syscall_ioctl __NR_ioctl
+static inline
_syscall3(int, __syscall_ioctl, int, fd, unsigned long int, request, void *, arg);
-int ioctl (int fd, unsigned long int request, ...)
+int attribute_hidden __ioctl (int fd, unsigned long int request, ...)
{
void *arg;
va_list ap;
@@ -68,3 +69,4 @@ int ioctl (int fd, unsigned long int request, ...)
return result;
}
+strong_alias(__ioctl,ioctl)
diff --git a/libc/sysdeps/linux/powerpc/mmap.c b/libc/sysdeps/linux/powerpc/mmap.c
index ec4bfd1f9..cac08ba65 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 * mmap(void *start, size_t length, int prot, int flags, int fd,
+void attribute_hidden * __mmap(void *start, size_t length, int prot, int flags, int fd,
off_t offset)
{
unsigned long __sc_ret, __sc_err;
@@ -45,4 +45,4 @@ void * mmap(void *start, size_t length, int prot, int flags, int fd,
__syscall_return (void *);
}
-
+strong_alias(__mmap,mmap)
diff --git a/libc/sysdeps/linux/sh/mmap.c b/libc/sysdeps/linux/sh/mmap.c
index 622857764..5424942b6 100644
--- a/libc/sysdeps/linux/sh/mmap.c
+++ b/libc/sysdeps/linux/sh/mmap.c
@@ -31,4 +31,6 @@
#include <sys/syscall.h>
-_syscall6(__ptr_t, mmap, __ptr_t, addr, size_t, len, int, prot, int, flags, int, fd, __off_t, offset);
+#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)
diff --git a/libc/sysdeps/linux/sh/pipe.c b/libc/sysdeps/linux/sh/pipe.c
index b07f42d31..a15034599 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 pipe(int *fd)
+int attribute_hidden __pipe(int *fd)
{
long __res, __res2;
__asm__ __volatile__ (
@@ -27,5 +27,4 @@ int pipe(int *fd)
fd[1] = __res2;
return(0);
}
-
-
+strong_alias(__pipe,pipe)
diff --git a/libc/sysdeps/linux/x86_64/mmap.c b/libc/sysdeps/linux/x86_64/mmap.c
index 117d93ddc..f14f1b6f9 100644
--- a/libc/sysdeps/linux/x86_64/mmap.c
+++ b/libc/sysdeps/linux/x86_64/mmap.c
@@ -13,5 +13,7 @@
#include <sys/mman.h>
#include <sys/syscall.h>
-_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
+#define __NR___mmap __NR_mmap
+attribute_hidden _syscall6(void *, __mmap, void *, start, size_t, length, int, prot,
int, flags, int, fd, off_t, offset);
+strong_alias(__mmap,mmap)
diff --git a/libc/sysdeps/linux/x86_64/sigaction.c b/libc/sysdeps/linux/x86_64/sigaction.c
index 32b13c064..41f9a8c8e 100644
--- a/libc/sysdeps/linux/x86_64/sigaction.c
+++ b/libc/sysdeps/linux/x86_64/sigaction.c
@@ -46,8 +46,8 @@ extern void restore (void) asm ("__restore") attribute_hidden;
If OACT is not NULL, put the old action for SIG in *OACT. */
/* psm: couldn't use __sigaction, if building w/ disabled hidden,
* it will conflict w/ the one in libpthread */
-int attribute_hidden
-__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct kernel_sigaction kact, koact;
@@ -79,8 +79,8 @@ extern void restore (void) asm ("__restore") attribute_hidden;
/* If ACT is not NULL, change the action for SIG to *ACT.
If OACT is not NULL, put the old action for SIG in *OACT. */
-int attribute_hidden
-__sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oact)
+int
+__libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
{
int result;
struct old_kernel_sigaction kact, koact;
@@ -119,8 +119,8 @@ __sigaction_internal (int sig, const struct sigaction *act, struct sigaction *oa
return result;
}
#endif
-strong_alias(__sigaction_internal,__libc_sigaction)
-weak_alias(__sigaction_internal,sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
/* NOTE: Please think twice before making any changes to the bits of
code below. GDB needs some intimate knowledge about it to