clarify the purpose of this project
[nyanglibc.git] / libio / vtables.shared.s
blob3fd567bc112ce784aaee4c0f1ce3644331fae68a
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 .section .rodata.str1.8,"aMS",@progbits,1
7 .align 8
8 .LC0:
9 .string "Fatal error: glibc detected an invalid stdio handle\n"
10 #NO_APP
11 .text
12 .p2align 4,,15
13 .globl _IO_vtable_check
14 .hidden _IO_vtable_check
15 .type _IO_vtable_check, @function
16 _IO_vtable_check:
17 leaq _IO_vtable_check(%rip), %rdi
18 movq IO_accept_foreign_vtables(%rip), %rax
19 #APP
20 # 46 "vtables.c" 1
21 ror $2*8+1, %rax
22 xor %fs:48, %rax
23 # 0 "" 2
24 #NO_APP
25 cmpq %rdi, %rax
26 je .L9
27 movq _rtld_global_ro@GOTPCREL(%rip), %rax
28 cmpq $0, 664(%rax)
29 je .L9
30 subq $56, %rsp
31 xorl %ecx, %ecx
32 leaq 8(%rsp), %rdx
33 leaq 16(%rsp), %rsi
34 call __GI__dl_addr
35 testl %eax, %eax
36 je .L4
37 movq 8(%rsp), %rax
38 cmpq $0, 48(%rax)
39 je .L4
40 addq $56, %rsp
41 ret
42 .p2align 4,,10
43 .p2align 3
44 .L9:
45 rep ret
46 .L4:
47 leaq .LC0(%rip), %rdi
48 call __GI___libc_fatal
49 .size _IO_vtable_check, .-_IO_vtable_check
50 .section .text.startup,"ax",@progbits
51 .p2align 4,,15
52 .type check_stdfiles_vtables, @function
53 check_stdfiles_vtables:
54 movq _IO_2_1_stdin_@GOTPCREL(%rip), %rdx
55 leaq __GI__IO_file_jumps(%rip), %rax
56 cmpq %rax, 216(%rdx)
57 je .L17
58 .L14:
59 leaq _IO_vtable_check(%rip), %rax
60 #APP
61 # 915 "../libio/libioP.h" 1
62 xor %fs:48, %rax
63 rol $2*8+1, %rax
64 # 0 "" 2
65 #NO_APP
66 movq %rax, IO_accept_foreign_vtables(%rip)
67 ret
68 .L17:
69 movq _IO_2_1_stdout_@GOTPCREL(%rip), %rdx
70 cmpq %rax, 216(%rdx)
71 jne .L14
72 movq _IO_2_1_stderr_@GOTPCREL(%rip), %rdx
73 cmpq %rax, 216(%rdx)
74 jne .L14
75 ret
76 .size check_stdfiles_vtables, .-check_stdfiles_vtables
77 .section .ctors,"aw",@progbits
78 .align 8
79 .quad check_stdfiles_vtables
80 .hidden IO_accept_foreign_vtables
81 .comm IO_accept_foreign_vtables,8,8