clarify the purpose of this project
[nyanglibc.git] / elf / dl-error-minimal.shared.s
blob8c57feb3a99fef9f94c00292a04cf6851e129183
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string ": "
5 .LC1:
6 .string ""
7 .section .rodata.str1.8,"aMS",@progbits,1
8 .align 8
9 .LC2:
10 .string "error while loading shared libraries"
11 .section .rodata.str1.1
12 .LC3:
13 .string "<program name unknown>"
14 .LC4:
15 .string "%s: %s: %s%s%s%s%s\n"
16 .text
17 .p2align 4,,15
18 .type fatal_error, @function
19 fatal_error:
20 pushq %rbp
21 pushq %rbx
22 leaq .LC1(%rip), %rax
23 movq %rdx, %rbx
24 movq %rsi, %rbp
25 movq %rcx, %r9
26 subq $1048, %rsp
27 testl %edi, %edi
28 movq %rax, %rdx
29 jne .L12
30 .L2:
31 cmpb $0, 0(%rbp)
32 leaq .LC1(%rip), %rcx
33 leaq .LC0(%rip), %r8
34 leaq .LC4(%rip), %rdi
35 cmove %rcx, %r8
36 leaq .LC2(%rip), %rcx
37 testq %rbx, %rbx
38 cmove %rcx, %rbx
39 movq __GI__dl_argv(%rip), %rcx
40 movq (%rcx), %rsi
41 leaq .LC3(%rip), %rcx
42 pushq %rax
43 pushq %rdx
44 movq %rbx, %rdx
45 testq %rsi, %rsi
46 cmove %rcx, %rsi
47 movq %rbp, %rcx
48 xorl %eax, %eax
49 call __GI__dl_fatal_printf
50 .L12:
51 leaq 16(%rsp), %rsi
52 movl $1024, %edx
53 movq %rcx, 8(%rsp)
54 call __strerror_r
55 leaq .LC0(%rip), %rdx
56 movq 8(%rsp), %r9
57 jmp .L2
58 .size fatal_error, .-fatal_error
59 .p2align 4,,15
60 .globl _dl_signal_exception
61 .type _dl_signal_exception, @function
62 _dl_signal_exception:
63 subq $8, %rsp
64 movq catch_hook(%rip), %rax
65 testq %rax, %rax
66 je .L14
67 movq (%rax), %rdx
68 movdqu (%rsi), %xmm0
69 movups %xmm0, (%rdx)
70 movq 16(%rsi), %rcx
71 movl $1, %esi
72 movq %rcx, 16(%rdx)
73 movq 8(%rax), %rdx
74 movl %edi, (%rdx)
75 leaq 16(%rax), %rdi
76 call __longjmp
77 .L14:
78 movq 8(%rsi), %rcx
79 movq (%rsi), %rsi
80 call fatal_error
81 .size _dl_signal_exception, .-_dl_signal_exception
82 .section .rodata.str1.1
83 .LC5:
84 .string "DYNAMIC LINKER BUG!!!"
85 .text
86 .p2align 4,,15
87 .globl _dl_signal_error
88 .type _dl_signal_error, @function
89 _dl_signal_error:
90 pushq %rbp
91 pushq %rbx
92 leaq .LC5(%rip), %rax
93 movl %edi, %ebp
94 subq $8, %rsp
95 movq catch_hook(%rip), %rbx
96 testq %rcx, %rcx
97 cmove %rax, %rcx
98 testq %rbx, %rbx
99 je .L18
100 movq (%rbx), %rdi
101 movq %rcx, %rdx
102 call __GI__dl_exception_create
103 movq 8(%rbx), %rax
104 leaq 16(%rbx), %rdi
105 movl $1, %esi
106 movl %ebp, (%rax)
107 call __longjmp
108 .L18:
109 call fatal_error
110 .size _dl_signal_error, .-_dl_signal_error
111 .section .rodata.str1.1
112 .LC6:
113 .string "continued"
114 .LC7:
115 .string "fatal"
116 .LC8:
117 .string "%s: error: %s: %s (%s)\n"
118 .text
119 .p2align 4,,15
120 .globl _dl_signal_cexception
121 .hidden _dl_signal_cexception
122 .type _dl_signal_cexception, @function
123 _dl_signal_cexception:
124 testl $-2177, _rtld_local_ro(%rip)
125 pushq %r12
126 movq %rdx, %r12
127 pushq %rbp
128 movq receiver(%rip), %rax
129 movl %edi, %ebp
130 pushq %rbx
131 movq %rsi, %rbx
132 jne .L29
133 .L21:
134 testq %rax, %rax
135 je .L23
136 movq 8(%rbx), %rdx
137 movq (%rbx), %rsi
138 movl %ebp, %edi
139 popq %rbx
140 popq %rbp
141 popq %r12
142 jmp *%rax
143 .p2align 4,,10
144 .p2align 3
145 .L29:
146 testq %rax, %rax
147 movq 8(%rsi), %rcx
148 leaq .LC7(%rip), %rax
149 leaq .LC6(%rip), %r8
150 movq (%rsi), %rsi
151 leaq .LC8(%rip), %rdi
152 cmove %rax, %r8
153 xorl %eax, %eax
154 call _dl_debug_printf
155 movq receiver(%rip), %rax
156 jmp .L21
157 .L23:
158 movq %r12, %rdx
159 movq %rbx, %rsi
160 movl %ebp, %edi
161 call _dl_signal_exception@PLT
162 .size _dl_signal_cexception, .-_dl_signal_cexception
163 .p2align 4,,15
164 .globl _dl_signal_cerror
165 .hidden _dl_signal_cerror
166 .type _dl_signal_cerror, @function
167 _dl_signal_cerror:
168 pushq %r13
169 pushq %r12
170 movq %rdx, %r13
171 pushq %rbp
172 pushq %rbx
173 movl %edi, %r12d
174 movq %rsi, %rbx
175 movq %rcx, %rbp
176 subq $8, %rsp
177 testl $-2177, _rtld_local_ro(%rip)
178 movq receiver(%rip), %rax
179 jne .L39
180 .L31:
181 testq %rax, %rax
182 je .L33
183 addq $8, %rsp
184 movq %rbp, %rdx
185 movq %rbx, %rsi
186 movl %r12d, %edi
187 popq %rbx
188 popq %rbp
189 popq %r12
190 popq %r13
191 jmp *%rax
192 .p2align 4,,10
193 .p2align 3
194 .L39:
195 testq %rax, %rax
196 leaq .LC6(%rip), %r8
197 leaq .LC7(%rip), %rax
198 leaq .LC8(%rip), %rdi
199 cmove %rax, %r8
200 xorl %eax, %eax
201 call _dl_debug_printf
202 movq receiver(%rip), %rax
203 jmp .L31
204 .L33:
205 movq %rbp, %rcx
206 movq %r13, %rdx
207 movq %rbx, %rsi
208 movl %r12d, %edi
209 call _dl_signal_error@PLT
210 .size _dl_signal_cerror, .-_dl_signal_cerror
211 .p2align 4,,15
212 .globl _dl_catch_exception
213 .type _dl_catch_exception, @function
214 _dl_catch_exception:
215 pushq %rbx
216 subq $288, %rsp
217 movq catch_hook(%rip), %rbx
218 testq %rdi, %rdi
219 movq %rdi, 8(%rsp)
220 movq %rsi, 24(%rsp)
221 movq %rdx, 32(%rsp)
222 movq %rbx, 16(%rsp)
223 jne .L41
224 movq $0, catch_hook(%rip)
225 movq %rdx, %rdi
226 call *%rsi
227 movq %rbx, catch_hook(%rip)
228 xorl %eax, %eax
229 .L40:
230 addq $288, %rsp
231 popq %rbx
233 .p2align 4,,10
234 .p2align 3
235 .L41:
236 movq 8(%rsp), %rax
237 leaq 64(%rsp), %rdi
238 xorl %esi, %esi
239 movq %rdi, catch_hook(%rip)
240 leaq 80(%rsp), %rdi
241 movq %rax, 64(%rsp)
242 leaq 60(%rsp), %rax
243 movq %rax, 72(%rsp)
244 call __sigsetjmp
245 testl %eax, %eax
246 movl %eax, 44(%rsp)
247 jne .L44
248 movq 24(%rsp), %rcx
249 movq 32(%rsp), %rdi
250 call *%rcx
251 movq 8(%rsp), %rax
252 movq 16(%rsp), %rcx
253 pxor %xmm0, %xmm0
254 movq $0, 16(%rax)
255 movq %rcx, catch_hook(%rip)
256 movups %xmm0, (%rax)
257 movl 44(%rsp), %eax
258 addq $288, %rsp
259 popq %rbx
261 .p2align 4,,10
262 .p2align 3
263 .L44:
264 movq 16(%rsp), %rax
265 movq %rax, catch_hook(%rip)
266 movl 60(%rsp), %eax
267 jmp .L40
268 .size _dl_catch_exception, .-_dl_catch_exception
269 .p2align 4,,15
270 .globl _dl_catch_error
271 .type _dl_catch_error, @function
272 _dl_catch_error:
273 pushq %r12
274 pushq %rbp
275 movq %rdi, %r12
276 pushq %rbx
277 movq %rsi, %rbp
278 movq %rdx, %rbx
279 movq %rcx, %rsi
280 movq %r8, %rdx
281 subq $32, %rsp
282 movq %rsp, %rdi
283 call _dl_catch_exception@PLT
284 movq (%rsp), %rdx
285 movq %rdx, (%r12)
286 movq 8(%rsp), %rdx
287 cmpq %rdx, 16(%rsp)
288 movq %rdx, 0(%rbp)
289 sete (%rbx)
290 addq $32, %rsp
291 popq %rbx
292 popq %rbp
293 popq %r12
295 .size _dl_catch_error, .-_dl_catch_error
296 .p2align 4,,15
297 .globl _dl_receive_error
298 .hidden _dl_receive_error
299 .type _dl_receive_error, @function
300 _dl_receive_error:
301 pushq %rbp
302 pushq %rbx
303 subq $8, %rsp
304 movq catch_hook(%rip), %rbp
305 movq receiver(%rip), %rbx
306 movq $0, catch_hook(%rip)
307 movq %rdi, receiver(%rip)
308 movq %rdx, %rdi
309 call *%rsi
310 movq %rbp, catch_hook(%rip)
311 movq %rbx, receiver(%rip)
312 addq $8, %rsp
313 popq %rbx
314 popq %rbp
316 .size _dl_receive_error, .-_dl_receive_error
317 .local receiver
318 .comm receiver,8,8
319 .local catch_hook
320 .comm catch_hook,8,8
321 .hidden __sigsetjmp
322 .hidden _dl_debug_printf
323 .hidden _rtld_local_ro
324 .hidden __longjmp
325 .hidden __strerror_r