clarify the purpose of this project
[nyanglibc.git] / misc / prctl.shared.s
blob4cea8ac75fecc6f3d4a2971215571283b428c994
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __GI___prctl
9 .hidden __GI___prctl
10 .type __GI___prctl, @function
11 __GI___prctl:
12 leaq 8(%rsp), %rax
13 movq %rsi, -40(%rsp)
14 movq %rdx, -32(%rsp)
15 movq %rcx, -24(%rsp)
16 movq %r8, -16(%rsp)
17 movq %rax, -64(%rsp)
18 leaq -48(%rsp), %rax
19 movl $32, -72(%rsp)
20 movq 8(%rax), %rsi
21 movq 16(%rax), %rdx
22 movq %rax, -56(%rsp)
23 movq 32(%rax), %r8
24 movq 24(%rax), %r10
25 movl $157, %eax
26 #APP
27 # 38 "../sysdeps/unix/sysv/linux/prctl.c" 1
28 syscall
30 # 0 "" 2
31 #NO_APP
32 cmpq $-4096, %rax
33 ja .L13
34 rep ret
35 .p2align 4,,10
36 .p2align 3
37 .L13:
38 movq __libc_errno@gottpoff(%rip), %rdx
39 negl %eax
40 movl %eax, %fs:(%rdx)
41 movl $-1, %eax
42 ret
43 .size __GI___prctl, .-__GI___prctl
44 .globl __prctl
45 .set __prctl,__GI___prctl
46 .weak prctl
47 .set prctl,__prctl