summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux')
-rw-r--r--libc/sysdeps/linux/arm/ioperm.c1
-rw-r--r--libc/sysdeps/linux/arm/mmap64.S5
-rw-r--r--libc/sysdeps/linux/common/mmap.c3
-rw-r--r--libc/sysdeps/linux/common/mmap64.c3
-rw-r--r--libc/sysdeps/linux/common/mremap.c4
-rw-r--r--libc/sysdeps/linux/frv/mmap.c3
-rw-r--r--libc/sysdeps/linux/hppa/mmap.c4
-rw-r--r--libc/sysdeps/linux/i386/mmap.S11
-rw-r--r--libc/sysdeps/linux/mips/mmap.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/x86_64/mmap.c4
12 files changed, 32 insertions, 18 deletions
diff --git a/libc/sysdeps/linux/arm/ioperm.c b/libc/sysdeps/linux/arm/ioperm.c
index d69d475d6..15162f916 100644
--- a/libc/sysdeps/linux/arm/ioperm.c
+++ b/libc/sysdeps/linux/arm/ioperm.c
@@ -34,6 +34,7 @@
enable all the ports all of the time. */
#define readlink __readlink
+#define mmap __mmap
#include <errno.h>
#include <fcntl.h>
diff --git a/libc/sysdeps/linux/arm/mmap64.S b/libc/sysdeps/linux/arm/mmap64.S
index 63b02f9df..8fb7edcce 100644
--- a/libc/sysdeps/linux/arm/mmap64.S
+++ b/libc/sysdeps/linux/arm/mmap64.S
@@ -52,10 +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
+ beq __mmap
#endif
.Linval:
mov r0, $-EINVAL
diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c
index 94c0d82b3..7387f28b4 100644
--- a/libc/sysdeps/linux/common/mmap.c
+++ b/libc/sysdeps/linux/common/mmap.c
@@ -14,7 +14,7 @@
#ifdef __NR_mmap
#define __NR__mmap __NR_mmap
static inline _syscall1(__ptr_t, _mmap, unsigned long *, buffer);
-__ptr_t mmap(__ptr_t addr, size_t len, int prot,
+__ptr_t attribute_hidden __mmap(__ptr_t addr, size_t len, int prot,
int flags, int fd, __off_t offset)
{
unsigned long buffer[6];
@@ -27,4 +27,5 @@ __ptr_t mmap(__ptr_t addr, size_t len, int prot,
buffer[5] = (unsigned long) offset;
return (__ptr_t) _mmap(buffer);
}
+strong_alias(__mmap,mmap)
#endif
diff --git a/libc/sysdeps/linux/common/mmap64.c b/libc/sysdeps/linux/common/mmap64.c
index 7f329c6c9..804d6af50 100644
--- a/libc/sysdeps/linux/common/mmap64.c
+++ b/libc/sysdeps/linux/common/mmap64.c
@@ -19,6 +19,8 @@
/* Massivly hacked up for uClibc by Erik Andersen */
+#define mmap __mmap
+
#include <features.h>
#include <errno.h>
#include <unistd.h>
@@ -84,4 +86,3 @@ __ptr_t mmap64(__ptr_t addr, size_t len, int prot, int flags, int fd, __off64_t
#endif
#endif /* __UCLIBC_HAS_LFS__ */
-
diff --git a/libc/sysdeps/linux/common/mremap.c b/libc/sysdeps/linux/common/mremap.c
index 200c2e1ef..f4a4670d2 100644
--- a/libc/sysdeps/linux/common/mremap.c
+++ b/libc/sysdeps/linux/common/mremap.c
@@ -10,5 +10,7 @@
#include "syscalls.h"
#include <unistd.h>
#include <sys/mman.h>
-_syscall4(__ptr_t, mremap, __ptr_t, old_address, size_t, old_size, size_t,
+#define __NR___mremap __NR_mremap
+attribute_hidden _syscall4(__ptr_t, __mremap, __ptr_t, old_address, size_t, old_size, size_t,
new_size, int, may_move);
+strong_alias(__mremap,mremap)
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/hppa/mmap.c b/libc/sysdeps/linux/hppa/mmap.c
index 117d93ddc..f14f1b6f9 100644
--- a/libc/sysdeps/linux/hppa/mmap.c
+++ b/libc/sysdeps/linux/hppa/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/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/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/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/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)