summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/arm/sigaction.c4
-rw-r--r--libc/sysdeps/linux/common/__syscall_ipc.c2
-rw-r--r--libc/sysdeps/linux/common/alarm.c6
-rw-r--r--libc/sysdeps/linux/common/chdir.c4
-rw-r--r--libc/sysdeps/linux/common/clock_gettime.c2
-rw-r--r--libc/sysdeps/linux/common/dl-osinfo.h2
-rw-r--r--libc/sysdeps/linux/common/fstat.c5
-rw-r--r--libc/sysdeps/linux/common/fstat64.c4
-rw-r--r--libc/sysdeps/linux/common/fstatfs.c4
-rw-r--r--libc/sysdeps/linux/common/getcwd.c3
-rw-r--r--libc/sysdeps/linux/common/gettimeofday.c1
-rw-r--r--libc/sysdeps/linux/common/ioctl.c5
-rw-r--r--libc/sysdeps/linux/common/lstat.c5
-rw-r--r--libc/sysdeps/linux/common/lstat64.c4
-rw-r--r--libc/sysdeps/linux/common/mkdir.c3
-rw-r--r--libc/sysdeps/linux/common/mkfifo.c2
-rw-r--r--libc/sysdeps/linux/common/mknod.c3
-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/common/nanosleep.c3
-rw-r--r--libc/sysdeps/linux/common/noophooks.c5
-rw-r--r--libc/sysdeps/linux/common/pause.c10
-rw-r--r--libc/sysdeps/linux/common/pipe.c4
-rw-r--r--libc/sysdeps/linux/common/poll.c9
-rw-r--r--libc/sysdeps/linux/common/rmdir.c4
-rw-r--r--libc/sysdeps/linux/common/select.c19
-rw-r--r--libc/sysdeps/linux/common/sigpending.c2
-rw-r--r--libc/sysdeps/linux/common/sigsuspend.c16
-rw-r--r--libc/sysdeps/linux/common/stat.c5
-rw-r--r--libc/sysdeps/linux/common/stat64.c4
-rw-r--r--libc/sysdeps/linux/common/statfs.c4
-rw-r--r--libc/sysdeps/linux/common/time.c2
-rw-r--r--libc/sysdeps/linux/common/unlink.c4
-rw-r--r--libc/sysdeps/linux/common/utime.c1
-rw-r--r--libc/sysdeps/linux/common/xstatconv.c4
-rw-r--r--libc/sysdeps/linux/common/xstatconv.h4
-rw-r--r--libc/sysdeps/linux/i386/sigaction.c3
-rw-r--r--libc/sysdeps/linux/mips/sigaction.c7
-rw-r--r--libc/sysdeps/linux/x86_64/sigaction.c3
40 files changed, 109 insertions, 73 deletions
diff --git a/libc/sysdeps/linux/arm/sigaction.c b/libc/sysdeps/linux/arm/sigaction.c
index a2d27eb5a..c2f79c337 100644
--- a/libc/sysdeps/linux/arm/sigaction.c
+++ b/libc/sysdeps/linux/arm/sigaction.c
@@ -127,6 +127,8 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
}
#endif
+
+#ifndef LIBC_SIGACTION
hidden_weak_alias(__libc_sigaction,__sigaction)
weak_alias(__libc_sigaction,sigaction)
-
+#endif
diff --git a/libc/sysdeps/linux/common/__syscall_ipc.c b/libc/sysdeps/linux/common/__syscall_ipc.c
index abffff931..b19637e40 100644
--- a/libc/sysdeps/linux/common/__syscall_ipc.c
+++ b/libc/sysdeps/linux/common/__syscall_ipc.c
@@ -11,6 +11,6 @@
#ifdef __NR_ipc
#define __NR___syscall_ipc __NR_ipc
-_syscall5(int, __syscall_ipc, unsigned int, call, int, first, int, second, int,
+attribute_hidden _syscall5(int, __syscall_ipc, unsigned int, call, int, first, int, second, int,
third, void *, ptr);
#endif
diff --git a/libc/sysdeps/linux/common/alarm.c b/libc/sysdeps/linux/common/alarm.c
index eec941d07..8239cec5b 100644
--- a/libc/sysdeps/linux/common/alarm.c
+++ b/libc/sysdeps/linux/common/alarm.c
@@ -12,10 +12,11 @@
#include "syscalls.h"
#include <unistd.h>
#ifdef __NR_alarm
-_syscall1(unsigned int, alarm, unsigned int, seconds);
+#define __NR___alarm __NR_alarm
+attribute_hidden _syscall1(unsigned int, __alarm, unsigned int, seconds);
#else
#include <sys/time.h>
-unsigned int alarm(unsigned int seconds)
+unsigned int attribute_hidden __alarm(unsigned int seconds)
{
struct itimerval old, new;
unsigned int retval;
@@ -34,3 +35,4 @@ unsigned int alarm(unsigned int seconds)
return retval;
}
#endif
+strong_alias(__alarm,alarm)
diff --git a/libc/sysdeps/linux/common/chdir.c b/libc/sysdeps/linux/common/chdir.c
index 037e39c8b..ff4ba527b 100644
--- a/libc/sysdeps/linux/common/chdir.c
+++ b/libc/sysdeps/linux/common/chdir.c
@@ -13,8 +13,8 @@
#define __NR___syscall_chdir __NR_chdir
static inline _syscall1(int, __syscall_chdir, const char *, path);
-int chdir(const char *path)
+int attribute_hidden __chdir(const char *path)
{
return __syscall_chdir(path);
}
-
+strong_alias(__chdir,chdir)
diff --git a/libc/sysdeps/linux/common/clock_gettime.c b/libc/sysdeps/linux/common/clock_gettime.c
index d6369681d..33863a828 100644
--- a/libc/sysdeps/linux/common/clock_gettime.c
+++ b/libc/sysdeps/linux/common/clock_gettime.c
@@ -20,6 +20,8 @@
*
*/
+#define gettimeofday __gettimeofday
+
#define _GNU_SOURCE
#include "syscalls.h"
#include <time.h>
diff --git a/libc/sysdeps/linux/common/dl-osinfo.h b/libc/sysdeps/linux/common/dl-osinfo.h
index 7998b08a4..ffb754321 100644
--- a/libc/sysdeps/linux/common/dl-osinfo.h
+++ b/libc/sysdeps/linux/common/dl-osinfo.h
@@ -7,6 +7,8 @@
#ifndef _DL_OSINFO_H
#define _DL_OSINFO_H 1
+#define gettimeofday __gettimeofday
+
#include <features.h>
#ifdef __UCLIBC_HAS_SSP__
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index 0116aeaaa..208227a7e 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -17,7 +17,7 @@
#define __NR___syscall_fstat __NR_fstat
static inline _syscall2(int, __syscall_fstat, int, fd, struct kernel_stat *, buf);
-int fstat(int fd, struct stat *buf)
+int attribute_hidden __fstat(int fd, struct stat *buf)
{
int result;
struct kernel_stat kbuf;
@@ -28,7 +28,8 @@ int fstat(int fd, struct stat *buf)
}
return result;
}
+strong_alias(__fstat,fstat)
#if ! defined __NR_fstat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(fstat, fstat64);
+weak_alias(fstat,fstat64)
#endif
diff --git a/libc/sysdeps/linux/common/fstat64.c b/libc/sysdeps/linux/common/fstat64.c
index 3534e21f3..87621beab 100644
--- a/libc/sysdeps/linux/common/fstat64.c
+++ b/libc/sysdeps/linux/common/fstat64.c
@@ -19,7 +19,7 @@
static inline _syscall2(int, __syscall_fstat64,
int, filedes, struct kernel_stat64 *, buf);
-int fstat64(int fd, struct stat64 *buf)
+int attribute_hidden __fstat64(int fd, struct stat64 *buf)
{
int result;
struct kernel_stat64 kbuf;
@@ -30,4 +30,6 @@ int fstat64(int fd, struct stat64 *buf)
}
return result;
}
+strong_alias(__fstat64,fstat64)
+
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/fstatfs.c b/libc/sysdeps/linux/common/fstatfs.c
index 1eac16a3a..9a7cf303b 100644
--- a/libc/sysdeps/linux/common/fstatfs.c
+++ b/libc/sysdeps/linux/common/fstatfs.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <sys/vfs.h>
-_syscall2(int, fstatfs, int, fd, struct statfs *, buf);
+#define __NR___fstatfs __NR_fstatfs
+attribute_hidden _syscall2(int, __fstatfs, int, fd, struct statfs *, buf);
+strong_alias(__fstatfs,fstatfs)
diff --git a/libc/sysdeps/linux/common/getcwd.c b/libc/sysdeps/linux/common/getcwd.c
index 4a1ea093e..71134af09 100644
--- a/libc/sysdeps/linux/common/getcwd.c
+++ b/libc/sysdeps/linux/common/getcwd.c
@@ -1,5 +1,8 @@
/* These functions find the absolute path to the current working directory. */
+#define opendir __opendir
+#define closedir __closedir
+
#include <stdlib.h>
#include <errno.h>
#include <sys/stat.h>
diff --git a/libc/sysdeps/linux/common/gettimeofday.c b/libc/sysdeps/linux/common/gettimeofday.c
index 478a4e84d..6c2613f01 100644
--- a/libc/sysdeps/linux/common/gettimeofday.c
+++ b/libc/sysdeps/linux/common/gettimeofday.c
@@ -9,7 +9,6 @@
#include "syscalls.h"
#include <sys/time.h>
-#undef gettimeofday
#define __NR___gettimeofday __NR_gettimeofday
attribute_hidden _syscall2(int, __gettimeofday, struct timeval *, tv, struct timezone *, tz);
strong_alias(__gettimeofday,gettimeofday)
diff --git a/libc/sysdeps/linux/common/ioctl.c b/libc/sysdeps/linux/common/ioctl.c
index 9b2442d0a..29293f359 100644
--- a/libc/sysdeps/linux/common/ioctl.c
+++ b/libc/sysdeps/linux/common/ioctl.c
@@ -12,9 +12,10 @@
#include <sys/ioctl.h>
#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 list;
@@ -25,4 +26,4 @@ int ioctl(int fd, unsigned long int request, ...)
va_end(list);
return __syscall_ioctl(fd, request, arg);
}
-
+strong_alias(__ioctl,ioctl)
diff --git a/libc/sysdeps/linux/common/lstat.c b/libc/sysdeps/linux/common/lstat.c
index b5b0e635e..8cacd4e78 100644
--- a/libc/sysdeps/linux/common/lstat.c
+++ b/libc/sysdeps/linux/common/lstat.c
@@ -18,7 +18,7 @@
static inline _syscall2(int, __syscall_lstat,
const char *, file_name, struct kernel_stat *, buf);
-int lstat(const char *file_name, struct stat *buf)
+int attribute_hidden __lstat(const char *file_name, struct stat *buf)
{
int result;
struct kernel_stat kbuf;
@@ -29,7 +29,8 @@ int lstat(const char *file_name, struct stat *buf)
}
return result;
}
+strong_alias(__lstat,lstat)
#if ! defined __NR_lstat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(lstat, lstat64);
+weak_alias(lstat,lstat64)
#endif
diff --git a/libc/sysdeps/linux/common/lstat64.c b/libc/sysdeps/linux/common/lstat64.c
index 90c3cf79c..f3ae083f1 100644
--- a/libc/sysdeps/linux/common/lstat64.c
+++ b/libc/sysdeps/linux/common/lstat64.c
@@ -19,7 +19,7 @@
static inline _syscall2(int, __syscall_lstat64, const char *, file_name,
struct kernel_stat64 *, buf);
-int lstat64(const char *file_name, struct stat64 *buf)
+int attribute_hidden __lstat64(const char *file_name, struct stat64 *buf)
{
int result;
struct kernel_stat64 kbuf;
@@ -30,4 +30,6 @@ int lstat64(const char *file_name, struct stat64 *buf)
}
return result;
}
+strong_alias(__lstat64,lstat64)
+
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/mkdir.c b/libc/sysdeps/linux/common/mkdir.c
index cac9e1d09..5e96cf599 100644
--- a/libc/sysdeps/linux/common/mkdir.c
+++ b/libc/sysdeps/linux/common/mkdir.c
@@ -14,7 +14,8 @@
static inline _syscall2(int, __syscall_mkdir, const char *, pathname,
__kernel_mode_t, mode);
-int mkdir(const char *pathname, mode_t mode)
+int attribute_hidden __mkdir(const char *pathname, mode_t mode)
{
return (__syscall_mkdir(pathname, mode));
}
+strong_alias(__mkdir,mkdir)
diff --git a/libc/sysdeps/linux/common/mkfifo.c b/libc/sysdeps/linux/common/mkfifo.c
index 975798a06..db7f8fc42 100644
--- a/libc/sysdeps/linux/common/mkfifo.c
+++ b/libc/sysdeps/linux/common/mkfifo.c
@@ -20,6 +20,8 @@
by Erik Andersen <andersee@debian.org>
*/
+#define mknod __mknod
+
#include <errno.h>
#include <stddef.h>
#include <sys/stat.h>
diff --git a/libc/sysdeps/linux/common/mknod.c b/libc/sysdeps/linux/common/mknod.c
index 85aedca21..d66747178 100644
--- a/libc/sysdeps/linux/common/mknod.c
+++ b/libc/sysdeps/linux/common/mknod.c
@@ -15,7 +15,7 @@
static inline _syscall3(int, __syscall_mknod, const char *, path,
__kernel_mode_t, mode, __kernel_dev_t, dev);
-int mknod(const char *path, mode_t mode, dev_t dev)
+int attribute_hidden __mknod(const char *path, mode_t mode, dev_t dev)
{
/* We must convert the dev_t value to a __kernel_dev_t */
__kernel_dev_t k_dev;
@@ -23,3 +23,4 @@ int mknod(const char *path, mode_t mode, dev_t dev)
k_dev = ((major(dev) & 0xff) << 8) | (minor(dev) & 0xff);
return __syscall_mknod(path, mode, k_dev);
}
+strong_alias(__mknod,mknod)
diff --git a/libc/sysdeps/linux/common/mmap.c b/libc/sysdeps/linux/common/mmap.c
index 94c0d82b3..3cd3eee4d 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,
+attribute_hidden __ptr_t __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/common/nanosleep.c b/libc/sysdeps/linux/common/nanosleep.c
index 00629e79e..3f5ffbaa3 100644
--- a/libc/sysdeps/linux/common/nanosleep.c
+++ b/libc/sysdeps/linux/common/nanosleep.c
@@ -13,4 +13,5 @@
#define __NR___libc_nanosleep __NR_nanosleep
_syscall2(int, __libc_nanosleep, const struct timespec *, req,
struct timespec *, rem);
-weak_alias(__libc_nanosleep, nanosleep);
+hidden_weak_alias(__libc_nanosleep,__nanosleep)
+weak_alias(__libc_nanosleep,nanosleep)
diff --git a/libc/sysdeps/linux/common/noophooks.c b/libc/sysdeps/linux/common/noophooks.c
index 65e9fdd15..b8c33eeac 100644
--- a/libc/sysdeps/linux/common/noophooks.c
+++ b/libc/sysdeps/linux/common/noophooks.c
@@ -18,9 +18,10 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
-#include <features.h>
+#include <libc-internal.h>
-void __cyg_profile_func_enter (void *this_fn, void *call_site)
+void
+__cyg_profile_func_enter (attribute_unused void *this_fn, attribute_unused void *call_site)
{
}
strong_alias (__cyg_profile_func_enter, __cyg_profile_func_exit)
diff --git a/libc/sysdeps/linux/common/pause.c b/libc/sysdeps/linux/common/pause.c
index 0587a7b66..a017ef611 100644
--- a/libc/sysdeps/linux/common/pause.c
+++ b/libc/sysdeps/linux/common/pause.c
@@ -7,22 +7,20 @@
* GNU Library General Public License (LGPL) version 2 or later.
*/
+#define __sigpause __sigpause_internal
+#define sigblock __sigblock
+
#include "syscalls.h"
#include <unistd.h>
#ifdef __NR_pause
-
#define __NR___libc_pause __NR_pause
_syscall0(int, __libc_pause);
-weak_alias(__libc_pause, pause);
-
#else
-
#include <signal.h>
int __libc_pause(void)
{
return (__sigpause(sigblock(0), 0));
}
-weak_alias(__libc_pause, pause);
-
#endif
+weak_alias(__libc_pause, pause)
diff --git a/libc/sysdeps/linux/common/pipe.c b/libc/sysdeps/linux/common/pipe.c
index 2cd8dd2f5..2045b8d64 100644
--- a/libc/sysdeps/linux/common/pipe.c
+++ b/libc/sysdeps/linux/common/pipe.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, pipe, int *, filedes);
+#define __NR___pipe __NR_pipe
+attribute_hidden _syscall1(int, __pipe, int *, filedes);
+strong_alias(__pipe,pipe)
diff --git a/libc/sysdeps/linux/common/poll.c b/libc/sysdeps/linux/common/poll.c
index f021e0269..c957f1edf 100644
--- a/libc/sysdeps/linux/common/poll.c
+++ b/libc/sysdeps/linux/common/poll.c
@@ -18,13 +18,14 @@
02111-1307 USA. */
#define getdtablesize __getdtablesize
+#define select __select
#include "syscalls.h"
#include <sys/poll.h>
#ifdef __NR_poll
-
-_syscall3(int, poll, struct pollfd *, fds,
+#define __NR___poll __NR_poll
+attribute_hidden _syscall3(int, __poll, struct pollfd *, fds,
unsigned long int, nfds, int, timeout);
#else
@@ -44,7 +45,7 @@ _syscall3(int, poll, struct pollfd *, fds,
Returns the number of file descriptors with events, zero if timed out,
or -1 for errors. */
-int poll(struct pollfd *fds, nfds_t nfds, int timeout)
+int attribute_hidden __poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
static int max_fd_size;
struct timeval tv;
@@ -203,4 +204,4 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
}
#endif
-
+strong_alias(__poll,poll)
diff --git a/libc/sysdeps/linux/common/rmdir.c b/libc/sysdeps/linux/common/rmdir.c
index c22025cc8..2f2c8a335 100644
--- a/libc/sysdeps/linux/common/rmdir.c
+++ b/libc/sysdeps/linux/common/rmdir.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, rmdir, const char *, pathname);
+#define __NR___rmdir __NR_rmdir
+attribute_hidden _syscall1(int, __rmdir, const char *, pathname);
+strong_alias(__rmdir,rmdir)
diff --git a/libc/sysdeps/linux/common/select.c b/libc/sysdeps/linux/common/select.c
index 2c35c32fc..36f88229a 100644
--- a/libc/sysdeps/linux/common/select.c
+++ b/libc/sysdeps/linux/common/select.c
@@ -11,19 +11,10 @@
#include <unistd.h>
#ifdef __NR__newselect
-
-extern int _newselect(int n, fd_set * readfds, fd_set * writefds,
- fd_set * exceptfds, struct timeval *timeout);
-_syscall5(int, _newselect, int, n, fd_set *, readfds, fd_set *, writefds,
- fd_set *, exceptfds, struct timeval *, timeout);
-weak_alias(_newselect, select);
-
+#define __NR___select __NR__newselect
#else
-
-//Used as a fallback if _newselect isn't available...
-extern int select(int n, fd_set * readfds, fd_set * writefds,
- fd_set * exceptfds, struct timeval *timeout);
-_syscall5(int, select, int, n, fd_set *, readfds, fd_set *, writefds,
- fd_set *, exceptfds, struct timeval *, timeout);
-
+#define __NR___select __NR_select
#endif
+attribute_hidden _syscall5(int, __select, int, n, fd_set *, readfds, fd_set *, writefds,
+ fd_set *, exceptfds, struct timeval *, timeout);
+strong_alias(__select,select)
diff --git a/libc/sysdeps/linux/common/sigpending.c b/libc/sysdeps/linux/common/sigpending.c
index f634aa6f1..66513feb6 100644
--- a/libc/sysdeps/linux/common/sigpending.c
+++ b/libc/sysdeps/linux/common/sigpending.c
@@ -13,7 +13,7 @@
#ifdef __NR_rt_sigpending
#define __NR___rt_sigpending __NR_rt_sigpending
-_syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size);
+static inline _syscall2(int, __rt_sigpending, sigset_t *, set, size_t, size);
int sigpending(sigset_t * set)
{
diff --git a/libc/sysdeps/linux/common/sigsuspend.c b/libc/sysdeps/linux/common/sigsuspend.c
index 878cadd3e..be69c62c2 100644
--- a/libc/sysdeps/linux/common/sigsuspend.c
+++ b/libc/sysdeps/linux/common/sigsuspend.c
@@ -13,22 +13,20 @@
#ifdef __NR_rt_sigsuspend
#define __NR___rt_sigsuspend __NR_rt_sigsuspend
-_syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size);
+static inline _syscall2(int, __rt_sigsuspend, const sigset_t *, mask, size_t, size);
-int sigsuspend(const sigset_t * mask)
+int attribute_hidden __sigsuspend(const sigset_t * mask)
{
return __rt_sigsuspend(mask, _NSIG / 8);
}
-
#else
-
-#define __NR___sigsuspend __NR_sigsuspend
-_syscall3(int, __sigsuspend, int, a, unsigned long int, b,
+#define __NR___syscall_sigsuspend __NR_sigsuspend
+static inline _syscall3(int, __syscall_sigsuspend, int, a, unsigned long int, b,
unsigned long int, c);
-int sigsuspend(const sigset_t * set)
+int attribute_hidden __sigsuspend(const sigset_t * set)
{
- return __sigsuspend(0, 0, set->__val[0]);
+ return __syscall_sigsuspend(0, 0, set->__val[0]);
}
-
#endif
+strong_alias(__sigsuspend,sigsuspend)
diff --git a/libc/sysdeps/linux/common/stat.c b/libc/sysdeps/linux/common/stat.c
index e5b2f0a51..cefbd5f8e 100644
--- a/libc/sysdeps/linux/common/stat.c
+++ b/libc/sysdeps/linux/common/stat.c
@@ -17,7 +17,7 @@
static inline _syscall2(int, __syscall_stat,
const char *, file_name, struct kernel_stat *, buf);
-int stat(const char *file_name, struct stat *buf)
+int attribute_hidden __stat(const char *file_name, struct stat *buf)
{
int result;
struct kernel_stat kbuf;
@@ -28,7 +28,8 @@ int stat(const char *file_name, struct stat *buf)
}
return result;
}
+strong_alias(__stat,stat)
#if ! defined __NR_stat64 && defined __UCLIBC_HAS_LFS__
-weak_alias(stat, stat64);
+weak_alias(stat,stat64)
#endif
diff --git a/libc/sysdeps/linux/common/stat64.c b/libc/sysdeps/linux/common/stat64.c
index 215f0a54c..d539906dd 100644
--- a/libc/sysdeps/linux/common/stat64.c
+++ b/libc/sysdeps/linux/common/stat64.c
@@ -19,7 +19,7 @@
static inline _syscall2(int, __syscall_stat64,
const char *, file_name, struct kernel_stat64 *, buf);
-int stat64(const char *file_name, struct stat64 *buf)
+int attribute_hidden __stat64(const char *file_name, struct stat64 *buf)
{
int result;
struct kernel_stat64 kbuf;
@@ -30,4 +30,6 @@ int stat64(const char *file_name, struct stat64 *buf)
}
return result;
}
+strong_alias(__stat64,stat64)
+
#endif /* __UCLIBC_HAS_LFS__ */
diff --git a/libc/sysdeps/linux/common/statfs.c b/libc/sysdeps/linux/common/statfs.c
index 4e31217b2..f8aa9d3ba 100644
--- a/libc/sysdeps/linux/common/statfs.c
+++ b/libc/sysdeps/linux/common/statfs.c
@@ -16,8 +16,8 @@
static inline _syscall2(int, __syscall_statfs,
const char *, path, struct statfs *, buf);
-int statfs(const char *path, struct statfs * buf)
+int attribute_hidden __statfs(const char *path, struct statfs * buf)
{
return __syscall_statfs(path, buf);
}
-
+strong_alias(__statfs,statfs)
diff --git a/libc/sysdeps/linux/common/time.c b/libc/sysdeps/linux/common/time.c
index 506850ff9..02ebd5570 100644
--- a/libc/sysdeps/linux/common/time.c
+++ b/libc/sysdeps/linux/common/time.c
@@ -7,6 +7,8 @@
* GNU Library General Public License (LGPL) version 2 or later.
*/
+#define gettimeofday __gettimeofday
+
#include "syscalls.h"
#include <time.h>
#include <sys/time.h>
diff --git a/libc/sysdeps/linux/common/unlink.c b/libc/sysdeps/linux/common/unlink.c
index 1c9aa17cf..4d9c3cda9 100644
--- a/libc/sysdeps/linux/common/unlink.c
+++ b/libc/sysdeps/linux/common/unlink.c
@@ -9,4 +9,6 @@
#include "syscalls.h"
#include <unistd.h>
-_syscall1(int, unlink, const char *, pathname);
+#define __NR___unlink __NR_unlink
+attribute_hidden _syscall1(int, __unlink, const char *, pathname);
+strong_alias(__unlink,unlink)
diff --git a/libc/sysdeps/linux/common/utime.c b/libc/sysdeps/linux/common/utime.c
index 5515488cd..8087863f7 100644
--- a/libc/sysdeps/linux/common/utime.c
+++ b/libc/sysdeps/linux/common/utime.c
@@ -8,6 +8,7 @@
*/
#define utimes __utimes
+#define gettimeofday __gettimeofday
#include "syscalls.h"
#include <utime.h>
diff --git a/libc/sysdeps/linux/common/xstatconv.c b/libc/sysdeps/linux/common/xstatconv.c
index df6ebaa2b..407f32496 100644
--- a/libc/sysdeps/linux/common/xstatconv.c
+++ b/libc/sysdeps/linux/common/xstatconv.c
@@ -32,7 +32,7 @@
#include <sys/stat.h>
#include "xstatconv.h"
-void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf)
+void attribute_hidden __xstat_conv(struct kernel_stat *kbuf, struct stat *buf)
{
/* Convert to current kernel version of `struct stat'. */
buf->st_dev = kbuf->st_dev;
@@ -57,7 +57,7 @@ void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf)
#if defined(__UCLIBC_HAS_LFS__)
-void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf)
+void attribute_hidden __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf)
{
/* Convert to current kernel version of `struct stat64'. */
buf->st_dev = kbuf->st_dev;
diff --git a/libc/sysdeps/linux/common/xstatconv.h b/libc/sysdeps/linux/common/xstatconv.h
index 38fcf6668..57c8bcbe2 100644
--- a/libc/sysdeps/linux/common/xstatconv.h
+++ b/libc/sysdeps/linux/common/xstatconv.h
@@ -25,8 +25,8 @@
* opinion on the subject, and different kernel revs use different names... */
#include <bits/kernel_stat.h>
-extern void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf);
+extern void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) attribute_hidden;
#if defined __UCLIBC_HAS_LFS__
-extern void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf);
+extern void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) attribute_hidden;
#endif
diff --git a/libc/sysdeps/linux/i386/sigaction.c b/libc/sysdeps/linux/i386/sigaction.c
index 2e50284b2..335fc9a27 100644
--- a/libc/sysdeps/linux/i386/sigaction.c
+++ b/libc/sysdeps/linux/i386/sigaction.c
@@ -119,8 +119,11 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
}
#endif
+
+#ifndef LIBC_SIGACTION
hidden_weak_alias(__libc_sigaction,__sigaction)
weak_alias(__libc_sigaction,sigaction)
+#endif
diff --git a/libc/sysdeps/linux/mips/sigaction.c b/libc/sysdeps/linux/mips/sigaction.c
index e35f11806..37637093f 100644
--- a/libc/sysdeps/linux/mips/sigaction.c
+++ b/libc/sysdeps/linux/mips/sigaction.c
@@ -32,7 +32,7 @@
/* 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;
@@ -72,7 +72,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;
@@ -112,5 +112,6 @@ int attribute_hidden __sigaction_internal (int sig, const struct sigaction *act,
#endif
#ifndef LIBC_SIGACTION
-weak_alias(__sigaction_internal,sigaction)
+hidden_weak_alias(__libc_sigaction,__sigaction)
+weak_alias(__libc_sigaction,sigaction)
#endif
diff --git a/libc/sysdeps/linux/x86_64/sigaction.c b/libc/sysdeps/linux/x86_64/sigaction.c
index 41f9a8c8e..250c8b5c6 100644
--- a/libc/sysdeps/linux/x86_64/sigaction.c
+++ b/libc/sysdeps/linux/x86_64/sigaction.c
@@ -119,8 +119,11 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
return result;
}
#endif
+
+#ifndef LIBC_SIGACTION
hidden_weak_alias(__libc_sigaction,__sigaction)
weak_alias(__libc_sigaction,sigaction)
+#endif
/* NOTE: Please think twice before making any changes to the bits of
code below. GDB needs some intimate knowledge about it to