summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/i386
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r--libc/sysdeps/linux/i386/__longjmp.S3
-rw-r--r--libc/sysdeps/linux/i386/brk.c5
-rw-r--r--libc/sysdeps/linux/i386/clone.S11
-rw-r--r--libc/sysdeps/linux/i386/mmap.S13
-rw-r--r--libc/sysdeps/linux/i386/sigaction.c11
-rw-r--r--libc/sysdeps/linux/i386/vfork.S15
6 files changed, 30 insertions, 28 deletions
diff --git a/libc/sysdeps/linux/i386/__longjmp.S b/libc/sysdeps/linux/i386/__longjmp.S
index 52f53bb68..d73a7cda2 100644
--- a/libc/sysdeps/linux/i386/__longjmp.S
+++ b/libc/sysdeps/linux/i386/__longjmp.S
@@ -17,6 +17,7 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+#include <features.h>
#define _ASM
#define _SETJMP_H
#include <bits/setjmp.h>
@@ -38,3 +39,5 @@ __longjmp:
/* Jump to saved PC. */
jmp *%edx
.size __longjmp,.-__longjmp
+
+libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/i386/brk.c b/libc/sysdeps/linux/i386/brk.c
index 5790e2fca..cf7e19be8 100644
--- a/libc/sysdeps/linux/i386/brk.c
+++ b/libc/sysdeps/linux/i386/brk.c
@@ -25,7 +25,7 @@
/* This must be initialized data because commons can't have aliases. */
void *__curbrk = 0;
-int attribute_hidden __brk (void *addr)
+int brk (void *addr)
{
void *__unbounded newbrk, *__unbounded scratch;
@@ -46,4 +46,5 @@ int attribute_hidden __brk (void *addr)
return 0;
}
-strong_alias(__brk,brk)
+libc_hidden_proto(brk)
+libc_hidden_def(brk)
diff --git a/libc/sysdeps/linux/i386/clone.S b/libc/sysdeps/linux/i386/clone.S
index 35a4e5b7f..14fc25ca1 100644
--- a/libc/sysdeps/linux/i386/clone.S
+++ b/libc/sysdeps/linux/i386/clone.S
@@ -42,9 +42,9 @@
#define CTID TLS+PTR_SIZE
.text
-.global __clone
-.type __clone,%function
-__clone:
+.global clone
+.type clone,%function
+clone:
/* Sanity check arguments. */
movl $-EINVAL,%eax
@@ -120,7 +120,4 @@ __clone:
__error:
jmp __syscall_error
-.size __clone,.-__clone
-
-.weak clone
- clone = __clone
+.size clone,.-clone
diff --git a/libc/sysdeps/linux/i386/mmap.S b/libc/sysdeps/linux/i386/mmap.S
index 4c4723dff..fe7a7986c 100644
--- a/libc/sysdeps/linux/i386/mmap.S
+++ b/libc/sysdeps/linux/i386/mmap.S
@@ -21,13 +21,10 @@
#include <bits/errno.h>
#include <sys/syscall.h>
-.global mmap
-.set mmap,__mmap
.text
-.global __mmap
-.hidden __mmap
-.type __mmap,%function
-__mmap:
+.global mmap
+.type mmap,%function
+mmap:
/* Save registers. */
movl %ebx, %edx
@@ -49,4 +46,6 @@ __mmap:
/* Successful; return the syscall's value. */
ret
-.size __mmap,.-__mmap
+.size mmap,.-mmap
+
+libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/i386/sigaction.c b/libc/sysdeps/linux/i386/sigaction.c
index 335fc9a27..e3162ab46 100644
--- a/libc/sysdeps/linux/i386/sigaction.c
+++ b/libc/sysdeps/linux/i386/sigaction.c
@@ -29,6 +29,8 @@
#if defined __NR_rt_sigaction
+libc_hidden_proto(memcpy)
+
extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
extern void restore (void) asm ("__restore") attribute_hidden;
@@ -48,7 +50,7 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
if (act) {
kact.k_sa_handler = act->sa_handler;
- __memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
+ memcpy (&kact.sa_mask, &act->sa_mask, sizeof (kact.sa_mask));
kact.sa_flags = act->sa_flags;
kact.sa_flags = act->sa_flags | SA_RESTORER;
@@ -63,7 +65,7 @@ int __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oa
if (oact && result >= 0) {
oact->sa_handler = koact.k_sa_handler;
- __memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (oact->sa_mask));
+ memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (oact->sa_mask));
oact->sa_flags = koact.sa_flags;
oact->sa_restorer = koact.sa_restorer;
}
@@ -121,8 +123,9 @@ 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)
+strong_alias(__libc_sigaction,sigaction)
+libc_hidden_proto(sigaction)
+libc_hidden_def(sigaction)
#endif
diff --git a/libc/sysdeps/linux/i386/vfork.S b/libc/sysdeps/linux/i386/vfork.S
index 18a8e5dfa..1f0e9d8ab 100644
--- a/libc/sysdeps/linux/i386/vfork.S
+++ b/libc/sysdeps/linux/i386/vfork.S
@@ -9,18 +9,17 @@
#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
.align 1<<4
-__vfork:
+vfork:
popl %ecx
movl $__NR_vfork,%eax
int $0x80
@@ -29,6 +28,6 @@ __vfork:
jae __syscall_error
ret
-.size __vfork,.-__vfork
+.size vfork,.-vfork
#endif
-strong_alias(__vfork,vfork)
+libc_hidden_def(vfork)