1 |
rakinar2 |
51 |
.text |
2 |
|
|
|
3 |
|
|
.globl plibc_init |
4 |
|
|
.type plibc_init, @function |
5 |
|
|
|
6 |
|
|
plibc_init: |
7 |
|
|
call get_errno_location |
8 |
|
|
xorl %edi, %edi |
9 |
|
|
movl %edi, (%rax) |
10 |
|
|
ret |
11 |
|
|
|
12 |
|
|
.globl plibc_deinit |
13 |
|
|
.type plibc_deinit, @function |
14 |
|
|
|
15 |
|
|
plibc_deinit: |
16 |
|
|
ret |
17 |
|
|
|
18 |
|
|
.globl plibc_deinit_sfds |
19 |
|
|
.type plibc_deinit_sfds, @function |
20 |
|
|
|
21 |
|
|
plibc_deinit_sfds: |
22 |
|
|
push %rbp |
23 |
|
|
mov %rsp, %rbp |
24 |
|
|
call plibc_sfds_status |
25 |
|
|
push %rax |
26 |
|
|
mov $3, %rcx |
27 |
|
|
.plibc_deinit_sfds.loop_start: |
28 |
|
|
mov %rcx, %rdi |
29 |
|
|
dec %rdi |
30 |
|
|
mov -8(%rbp), %rax |
31 |
|
|
movb (%rax, %rdi), %al |
32 |
|
|
test %al, %al |
33 |
|
|
jz .plibc_deinit_sfds.loop_repeat |
34 |
|
|
push %rcx |
35 |
|
|
call close |
36 |
|
|
pop %rcx |
37 |
|
|
.plibc_deinit_sfds.loop_repeat: |
38 |
|
|
loop .plibc_deinit_sfds.loop_start |
39 |
|
|
.plibc_deinit_sfds.loop_end: |
40 |
|
|
mov %rbp, %rsp |
41 |
|
|
pop %rbp |
42 |
|
|
ret |
43 |
|
|
|
44 |
|
|
.section .note.GNU-stack,"",@progbits |