summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/x86_64')
-rw-r--r--libc/sysdeps/linux/x86_64/__longjmp.S2
-rw-r--r--libc/sysdeps/linux/x86_64/brk.c5
-rw-r--r--libc/sysdeps/linux/x86_64/clone.S13
-rw-r--r--libc/sysdeps/linux/x86_64/mmap.c6
-rw-r--r--libc/sysdeps/linux/x86_64/sigaction.c14
-rw-r--r--libc/sysdeps/linux/x86_64/vfork.S15
6 files changed, 27 insertions, 28 deletions
diff --git a/libc/sysdeps/linux/x86_64/__longjmp.S b/libc/sysdeps/linux/x86_64/__longjmp.S
index aa47b7233..1ff6e0169 100644
--- a/libc/sysdeps/linux/x86_64/__longjmp.S
+++ b/libc/sysdeps/linux/x86_64/__longjmp.S
@@ -16,6 +16,7 @@
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>
@@ -43,3 +44,4 @@ __longjmp:
movq (JB_RSP*8)(%rdi),%rsp
jmpq *%rdx
.size __longjmp,.-__longjmp
+libc_hidden_def(__longjmp)
diff --git a/libc/sysdeps/linux/x86_64/brk.c b/libc/sysdeps/linux/x86_64/brk.c
index a00e2361e..8d85bcb3d 100644
--- a/libc/sysdeps/linux/x86_64/brk.c
+++ b/libc/sysdeps/linux/x86_64/brk.c
@@ -24,7 +24,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;
@@ -42,4 +42,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/x86_64/clone.S b/libc/sysdeps/linux/x86_64/clone.S
index 0ae999722..bea2e3a7a 100644
--- a/libc/sysdeps/linux/x86_64/clone.S
+++ b/libc/sysdeps/linux/x86_64/clone.S
@@ -50,10 +50,10 @@
.text
-.global __clone
-.type __clone,%function
+.global clone
+.type clone,%function
.align 4
-__clone:
+clone:
/* Sanity check arguments. */
movq $-EINVAL,%rax
testq %rdi,%rdi /* no NULL function pointers */
@@ -109,9 +109,6 @@ __clone:
call *%rax
/* Call exit with return value from function call. */
movq %rax, %rdi
- call _exit_internal
+ call HIDDEN_JUMPTARGET(_exit)
-.size __clone,.-__clone
-
-.weak clone
- clone = __clone
+.size clone,.-clone
diff --git a/libc/sysdeps/linux/x86_64/mmap.c b/libc/sysdeps/linux/x86_64/mmap.c
index f14f1b6f9..b69f0a2f2 100644
--- a/libc/sysdeps/linux/x86_64/mmap.c
+++ b/libc/sysdeps/linux/x86_64/mmap.c
@@ -13,7 +13,7 @@
#include <sys/mman.h>
#include <sys/syscall.h>
-#define __NR___mmap __NR_mmap
-attribute_hidden _syscall6(void *, __mmap, void *, start, size_t, length, int, prot,
+_syscall6(void *, mmap, void *, start, size_t, length, int, prot,
int, flags, int, fd, off_t, offset);
-strong_alias(__mmap,mmap)
+libc_hidden_proto(mmap)
+libc_hidden_def(mmap)
diff --git a/libc/sysdeps/linux/x86_64/sigaction.c b/libc/sysdeps/linux/x86_64/sigaction.c
index 250c8b5c6..7a2d1ce28 100644
--- a/libc/sysdeps/linux/x86_64/sigaction.c
+++ b/libc/sysdeps/linux/x86_64/sigaction.c
@@ -23,11 +23,8 @@
#include <signal.h>
#include <string.h>
-
#include <sys/syscall.h>
-
-
/* The difference here is that the sigaction structure used in the
kernel is not the same as we use in the libc. Therefore we must
translate it here. */
@@ -42,6 +39,8 @@
extern void restore_rt (void) asm ("__restore_rt") attribute_hidden;
extern void restore (void) asm ("__restore") attribute_hidden;
+libc_hidden_proto(memcpy)
+
/* 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. */
/* psm: couldn't use __sigaction, if building w/ disabled hidden,
@@ -54,7 +53,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
if (act) {
kact.k_sa_handler = act->sa_handler;
- __memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
+ memcpy (&kact.sa_mask, &act->sa_mask, sizeof (sigset_t));
kact.sa_flags = act->sa_flags | SA_RESTORER;
kact.sa_restorer = &restore_rt;
@@ -67,7 +66,7 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
oact ? __ptrvalue (&koact) : NULL, _NSIG / 8);
if (oact && result >= 0) {
oact->sa_handler = koact.k_sa_handler;
- __memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
+ memcpy (&oact->sa_mask, &koact.sa_mask, sizeof (sigset_t));
oact->sa_flags = koact.sa_flags;
oact->sa_restorer = koact.sa_restorer;
}
@@ -121,8 +120,9 @@ __libc_sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
#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
/* NOTE: Please think twice before making any changes to the bits of
diff --git a/libc/sysdeps/linux/x86_64/vfork.S b/libc/sysdeps/linux/x86_64/vfork.S
index 996f1289e..3315e337a 100644
--- a/libc/sysdeps/linux/x86_64/vfork.S
+++ b/libc/sysdeps/linux/x86_64/vfork.S
@@ -26,18 +26,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 16
-__vfork:
+vfork:
/* Pop the return PC value into RDI. We need a register that
is preserved by the syscall and that we're allowed to destroy. */
@@ -56,7 +55,7 @@ __vfork:
/* Normal return. */
ret
-.size __vfork,.-__vfork
+.size vfork,.-vfork
#endif /* __NR_vfork */
-strong_alias(__vfork,vfork)
+libc_hidden_def(vfork)