clarify the purpose of this project
[nyanglibc.git] / misc / mntent.shared.s
blob9dcc94381c36786b6c3aa2d3982aa261bbed6a94
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section __libc_freeres_ptrs, "aw", %nobits
7 .previous
8 #NO_APP
9 .p2align 4,,15
10 .type deallocate, @function
11 deallocate:
12 movq %rsi, %rdi
13 jmp free@PLT
14 .size deallocate, .-deallocate
15 .p2align 4,,15
16 .type allocate, @function
17 allocate:
18 movl $4136, %edi
19 jmp malloc@PLT
20 .size allocate, .-allocate
21 .p2align 4,,15
22 .globl getmntent
23 .type getmntent, @function
24 getmntent:
25 pushq %rbx
26 movq mntent_buffer(%rip), %rsi
27 movq %rdi, %rbx
28 testq %rsi, %rsi
29 je .L9
30 .L6:
31 movq %rbx, %rdi
32 leaq 40(%rsi), %rdx
33 movl $4096, %ecx
34 popq %rbx
35 jmp __GI___getmntent_r
36 .p2align 4,,10
37 .p2align 3
38 .L9:
39 leaq allocate(%rip), %rsi
40 leaq deallocate(%rip), %rdx
41 leaq mntent_buffer(%rip), %rdi
42 xorl %ecx, %ecx
43 call __GI___libc_allocate_once_slow
44 testq %rax, %rax
45 movq %rax, %rsi
46 jne .L6
47 xorl %eax, %eax
48 popq %rbx
49 ret
50 .size getmntent, .-getmntent
51 .section __libc_freeres_ptrs
52 #,"aw",@progbits
53 .align 8
54 .type mntent_buffer, @object
55 .size mntent_buffer, 8
56 mntent_buffer:
57 .zero 8