clarify the purpose of this project
[nyanglibc.git] / elf / dl-version.s
blob25a6eb6e1f42ac06b30cd40881eac49b483eeda1
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string "<main program>"
5 .section .rodata.str1.8,"aMS",@progbits,1
6 .align 8
7 .LC1:
8 .string "unsupported version %s of Verneed record"
9 .section .rodata.str1.1
10 .LC2:
11 .string "dl-version.c"
12 .LC3:
13 .string "needed != NULL"
14 .section .rodata.str1.8
15 .align 8
16 .LC4:
17 .string "checking for version `%s' in file %s [%lu] required by file %s [%lu]\n"
18 .align 8
19 .LC5:
20 .string "no version information available (required by %s)"
21 .section .rodata.str1.1
22 .LC6:
23 .string "def_offset != 0"
24 .section .rodata.str1.8
25 .align 8
26 .LC7:
27 .string "unsupported version %s of Verdef record"
28 .align 8
29 .LC8:
30 .string "weak version `%s' not found (required by %s)"
31 .align 8
32 .LC9:
33 .string "version `%s' not found (required by %s)"
34 .section .rodata.str1.1
35 .LC10:
36 .string "version lookup error"
37 .section .rodata.str1.8
38 .align 8
39 .LC11:
40 .string "cannot allocate version reference table"
41 .text
42 .p2align 4,,15
43 .globl _dl_check_map_versions
44 .hidden _dl_check_map_versions
45 .type _dl_check_map_versions, @function
46 _dl_check_map_versions:
47 movq 104(%rdi), %rax
48 testq %rax, %rax
49 je .L104
50 pushq %r15
51 pushq %r14
52 pushq %r13
53 pushq %r12
54 pushq %rbp
55 pushq %rbx
56 movq %rdi, %rbp
57 subq $152, %rsp
58 movq 8(%rax), %r15
59 movq 352(%rdi), %rax
60 movq 368(%rdi), %rdi
61 movl %edx, 64(%rsp)
62 movl %esi, 68(%rsp)
63 testq %rax, %rax
64 movq %rax, 72(%rsp)
65 movq %rdi, 56(%rsp)
66 je .L3
67 movq 8(%rax), %rax
68 addq 0(%rbp), %rax
69 xorl %r14d, %r14d
70 cmpw $1, (%rax)
71 movq %rax, 32(%rsp)
72 jne .L109
73 movq %r15, 16(%rsp)
74 movl %r14d, %r15d
75 .L4:
76 movq 32(%rsp), %rax
77 leaq _dl_ns(%rip), %rdi
78 movl 4(%rax), %r12d
79 movq 48(%rbp), %rax
80 addq 16(%rsp), %r12
81 leaq (%rax,%rax,8), %rdx
82 leaq (%rax,%rdx,2), %rax
83 movq (%rdi,%rax,8), %rbx
84 testq %rbx, %rbx
85 jne .L9
86 jmp .L7
87 .p2align 4,,10
88 .p2align 3
89 .L110:
90 movq 24(%rbx), %rbx
91 testq %rbx, %rbx
92 je .L7
93 .L9:
94 movq %rbx, %rsi
95 movq %r12, %rdi
96 call _dl_name_match_p
97 testl %eax, %eax
98 je .L110
99 .L8:
100 movl 64(%rsp), %ecx
101 testl %ecx, %ecx
102 jne .L111
103 .L13:
104 movq 32(%rsp), %rax
105 movq %rbx, 24(%rsp)
106 movl 8(%rax), %r12d
107 addq %rax, %r12
108 .L31:
109 movzwl 4(%r12), %eax
110 movq 8(%rbp), %r14
111 movl (%r12), %ebx
112 movw %ax, 46(%rsp)
113 movq 24(%rsp), %rax
114 movq 40(%rax), %r13
115 movl 8(%r12), %eax
116 addq 16(%rsp), %rax
117 cmpb $0, (%r14)
118 movq %rax, (%rsp)
119 jne .L15
120 movq _dl_argv(%rip), %rax
121 movq (%rax), %r14
122 leaq .LC0(%rip), %rax
123 testq %r14, %r14
124 cmove %rax, %r14
125 .L15:
126 movq 104(%r13), %rax
127 testb $16, _dl_debug_mask(%rip)
128 movq 8(%rax), %rax
129 movq %rax, 8(%rsp)
130 jne .L112
131 .L16:
132 movq 368(%r13), %rax
133 testq %rax, %rax
134 je .L113
135 movq 8(%rax), %rdx
136 testq %rdx, %rdx
137 je .L114
138 addq 0(%r13), %rdx
139 cmpw $1, (%rdx)
140 jne .L27
141 movq %r14, 48(%rsp)
142 movq %rbp, %r14
143 movl %ebx, %ebp
144 movq %rdx, %rbx
145 .L23:
146 cmpl 8(%rbx), %ebp
147 je .L115
148 .L25:
149 movl 16(%rbx), %eax
150 testl %eax, %eax
151 je .L26
152 addq %rax, %rbx
153 cmpw $1, (%rbx)
154 je .L23
155 movq %rbx, %rdx
156 .L27:
157 movb $0, 99(%rsp)
158 movzwl (%rdx), %edi
159 leaq 99(%rsp), %rsi
160 xorl %ecx, %ecx
161 movl $10, %edx
162 call _itoa_word
163 movq 8(%r13), %rsi
164 cmpb $0, (%rsi)
165 jne .L24
166 movq _dl_argv(%rip), %rdx
167 movq (%rdx), %rsi
168 leaq .LC0(%rip), %rdx
169 testq %rsi, %rsi
170 cmove %rdx, %rsi
171 .L24:
172 leaq 112(%rsp), %rbx
173 leaq .LC7(%rip), %rdx
174 movq %rax, %rcx
175 xorl %eax, %eax
176 movq %rbx, %rdi
177 call _dl_exception_create_format@PLT
178 .L21:
179 leaq .LC10(%rip), %rdx
180 movq %rbx, %rsi
181 xorl %edi, %edi
182 call _dl_signal_exception
183 .p2align 4,,10
184 .p2align 3
185 .L115:
186 movl 12(%rbx), %eax
187 movq (%rsp), %rdi
188 movl (%rbx,%rax), %esi
189 addq 8(%rsp), %rsi
190 call strcmp
191 testl %eax, %eax
192 jne .L25
193 movq %r14, %rbp
194 .L19:
195 movzwl 6(%r12), %eax
196 andl $32767, %eax
197 cmpl %eax, %r15d
198 cmovb %eax, %r15d
199 movl 12(%r12), %eax
200 testl %eax, %eax
201 je .L14
202 addq %rax, %r12
203 jmp .L31
204 .p2align 4,,10
205 .p2align 3
206 .L7:
207 movl 712(%rbp), %esi
208 testl %esi, %esi
209 je .L10
210 xorl %r13d, %r13d
211 jmp .L12
212 .p2align 4,,10
213 .p2align 3
214 .L11:
215 addl $1, %r13d
216 cmpl 712(%rbp), %r13d
217 jnb .L10
218 .L12:
219 movq 704(%rbp), %rdx
220 movl %r13d, %eax
221 movq %r12, %rdi
222 leaq 0(,%rax,8), %rbx
223 movq (%rdx,%rax,8), %rsi
224 call _dl_name_match_p
225 testl %eax, %eax
226 je .L11
227 movq 704(%rbp), %rax
228 movq (%rax,%rbx), %rbx
229 testq %rbx, %rbx
230 jne .L8
231 .p2align 4,,10
232 .p2align 3
233 .L10:
234 leaq __PRETTY_FUNCTION__.9166(%rip), %rcx
235 leaq .LC2(%rip), %rsi
236 leaq .LC3(%rip), %rdi
237 movl $205, %edx
238 call __assert_fail
239 .p2align 4,,10
240 .p2align 3
241 .L111:
242 testb $2, 797(%rbx)
243 je .L13
244 .p2align 4,,10
245 .p2align 3
246 .L14:
247 movq 32(%rsp), %rcx
248 movl 12(%rcx), %eax
249 testl %eax, %eax
250 je .L32
251 addq %rax, %rcx
252 movq %rcx, 32(%rsp)
253 jmp .L4
254 .p2align 4,,10
255 .p2align 3
256 .L3:
257 xorl %r14d, %r14d
258 cmpq $0, 56(%rsp)
259 je .L2
260 .L33:
261 movq 56(%rsp), %rax
262 movq 8(%rax), %rdx
263 addq 0(%rbp), %rdx
264 jmp .L107
265 .p2align 4,,10
266 .p2align 3
267 .L116:
268 addq %rax, %rdx
269 .L107:
270 movzwl 4(%rdx), %eax
271 andl $32767, %eax
272 cmpl %eax, %r14d
273 cmovb %eax, %r14d
274 movl 16(%rdx), %eax
275 testl %eax, %eax
276 jne .L116
277 .L34:
278 testl %r14d, %r14d
279 je .L2
280 leal 1(%r14), %edi
281 movl $24, %esi
282 movq %rdi, %rbx
283 call calloc@PLT
284 testq %rax, %rax
285 movq %rax, 744(%rbp)
286 je .L117
287 movq 464(%rbp), %rdx
288 movq 72(%rsp), %rdi
289 movl %ebx, 752(%rbp)
290 movq 8(%rdx), %rdx
291 testq %rdi, %rdi
292 movq %rdx, 840(%rbp)
293 je .L38
294 movq 8(%rdi), %rdi
295 addq 0(%rbp), %rdi
296 .p2align 4,,10
297 .p2align 3
298 .L42:
299 movl 8(%rdi), %ecx
300 addq %rdi, %rcx
301 jmp .L41
302 .p2align 4,,10
303 .p2align 3
304 .L118:
305 addq %rdx, %rcx
306 .L41:
307 movzwl 6(%rcx), %edx
308 movl %edx, %esi
309 andw $32767, %si
310 movzwl %si, %r8d
311 cmpl %r8d, %ebx
312 jbe .L39
313 movzwl %si, %esi
314 andw $-32768, %dx
315 movl (%rcx), %r8d
316 leaq (%rsi,%rsi,2), %rsi
317 movzwl %dx, %edx
318 leaq (%rax,%rsi,8), %rsi
319 movl %edx, 12(%rsi)
320 movl 8(%rcx), %edx
321 movl %r8d, 8(%rsi)
322 addq %r15, %rdx
323 movq %rdx, (%rsi)
324 movl 4(%rdi), %edx
325 addq %r15, %rdx
326 movq %rdx, 16(%rsi)
327 .L39:
328 movl 12(%rcx), %edx
329 testl %edx, %edx
330 jne .L118
331 movl 12(%rdi), %edx
332 testl %edx, %edx
333 je .L38
334 addq %rdx, %rdi
335 jmp .L42
336 .p2align 4,,10
337 .p2align 3
338 .L38:
339 movq 56(%rsp), %rdi
340 testq %rdi, %rdi
341 je .L2
342 movq 8(%rdi), %rdx
343 addq 0(%rbp), %rdx
344 jmp .L44
345 .p2align 4,,10
346 .p2align 3
347 .L119:
348 addq %rcx, %rdx
349 .L44:
350 testb $1, 2(%rdx)
351 jne .L43
352 movl 12(%rdx), %esi
353 movzwl 4(%rdx), %ecx
354 movl 8(%rdx), %edi
355 movl (%rdx,%rsi), %esi
356 andl $32767, %ecx
357 leaq (%rcx,%rcx,2), %rcx
358 leaq (%rax,%rcx,8), %rcx
359 addq %r15, %rsi
360 movl %edi, 8(%rcx)
361 movq %rsi, (%rcx)
362 movq $0, 16(%rcx)
363 .L43:
364 movl 16(%rdx), %ecx
365 testl %ecx, %ecx
366 jne .L119
367 .L2:
368 addq $152, %rsp
369 xorl %eax, %eax
370 popq %rbx
371 popq %rbp
372 popq %r12
373 popq %r13
374 popq %r14
375 popq %r15
377 .p2align 4,,10
378 .p2align 3
379 .L109:
380 movb $0, 99(%rsp)
381 movzwl (%rax), %edi
382 leaq 99(%rsp), %rsi
383 xorl %ecx, %ecx
384 movl $10, %edx
385 call _itoa_word
386 movq 8(%rbp), %rsi
387 cmpb $0, (%rsi)
388 je .L120
389 .L5:
390 leaq 112(%rsp), %rbx
391 leaq .LC1(%rip), %rdx
392 movq %rax, %rcx
393 xorl %eax, %eax
394 movq %rbx, %rdi
395 call _dl_exception_create_format@PLT
396 xorl %edi, %edi
397 .L6:
398 xorl %edx, %edx
399 movq %rbx, %rsi
400 call _dl_signal_exception
401 .p2align 4,,10
402 .p2align 3
403 .L113:
404 movl 68(%rsp), %edx
405 testl %edx, %edx
406 je .L19
407 movq 8(%r13), %rsi
408 movq %r14, %r10
409 cmpb $0, (%rsi)
410 jne .L20
411 movq _dl_argv(%rip), %rax
412 movq (%rax), %rsi
413 testq %rsi, %rsi
414 jne .L20
415 leaq .LC0(%rip), %rsi
416 .L20:
417 leaq 112(%rsp), %rbx
418 leaq .LC5(%rip), %rdx
419 movq %r10, %rcx
420 xorl %eax, %eax
421 movq %rbx, %rdi
422 call _dl_exception_create_format@PLT
423 jmp .L21
424 .p2align 4,,10
425 .p2align 3
426 .L112:
427 movq 8(%r13), %rdx
428 movq 48(%r13), %rcx
429 cmpb $0, (%rdx)
430 jne .L17
431 movq _dl_argv(%rip), %rax
432 movq (%rax), %rdx
433 leaq .LC0(%rip), %rax
434 testq %rdx, %rdx
435 cmove %rax, %rdx
436 .L17:
437 movq 48(%rbp), %r9
438 movq (%rsp), %rsi
439 leaq .LC4(%rip), %rdi
440 movq %r14, %r8
441 xorl %eax, %eax
442 call _dl_debug_printf
443 jmp .L16
444 .p2align 4,,10
445 .p2align 3
446 .L26:
447 testb $2, 46(%rsp)
448 movq %r14, %rbp
449 movq 48(%rsp), %r14
450 je .L28
451 movl 68(%rsp), %eax
452 testl %eax, %eax
453 je .L19
454 movq 8(%r13), %rsi
455 movq %r14, %r10
456 cmpb $0, (%rsi)
457 jne .L29
458 movq _dl_argv(%rip), %rax
459 movq (%rax), %rsi
460 testq %rsi, %rsi
461 jne .L29
462 leaq .LC0(%rip), %rsi
463 .L29:
464 leaq 112(%rsp), %rbx
465 movq (%rsp), %rcx
466 leaq .LC8(%rip), %rdx
467 movq %r10, %r8
468 xorl %eax, %eax
469 movq %rbx, %rdi
470 call _dl_exception_create_format@PLT
471 jmp .L21
472 .p2align 4,,10
473 .p2align 3
474 .L104:
475 xorl %eax, %eax
477 .L120:
478 movq _dl_argv(%rip), %rdx
479 movq (%rdx), %rsi
480 leaq .LC0(%rip), %rdx
481 testq %rsi, %rsi
482 cmove %rdx, %rsi
483 jmp .L5
484 .L32:
485 cmpq $0, 56(%rsp)
486 movl %r15d, %r14d
487 movq 16(%rsp), %r15
488 jne .L33
489 jmp .L34
490 .L28:
491 movq 8(%r13), %rsi
492 movq %r14, %r10
493 cmpb $0, (%rsi)
494 jne .L30
495 movq _dl_argv(%rip), %rax
496 movq (%rax), %rsi
497 leaq .LC0(%rip), %rax
498 testq %rsi, %rsi
499 cmove %rax, %rsi
500 .L30:
501 leaq 112(%rsp), %rbx
502 movq (%rsp), %rcx
503 leaq .LC9(%rip), %rdx
504 movq %r10, %r8
505 xorl %eax, %eax
506 movq %rbx, %rdi
507 call _dl_exception_create_format@PLT
508 jmp .L21
509 .L117:
510 movq 8(%rbp), %rsi
511 cmpb $0, (%rsi)
512 jne .L37
513 movq _dl_argv(%rip), %rax
514 movq (%rax), %rsi
515 leaq .LC0(%rip), %rax
516 testq %rsi, %rsi
517 cmove %rax, %rsi
518 .L37:
519 leaq 112(%rsp), %rbx
520 leaq .LC11(%rip), %rdx
521 movq %rbx, %rdi
522 call _dl_exception_create@PLT
523 movl $12, %edi
524 jmp .L6
525 .L114:
526 leaq __PRETTY_FUNCTION__.9144(%rip), %rcx
527 leaq .LC2(%rip), %rsi
528 leaq .LC6(%rip), %rdi
529 movl $88, %edx
530 call __assert_fail
531 .size _dl_check_map_versions, .-_dl_check_map_versions
532 .p2align 4,,15
533 .globl _dl_check_all_versions
534 .hidden _dl_check_all_versions
535 .type _dl_check_all_versions, @function
536 _dl_check_all_versions:
537 pushq %r13
538 pushq %r12
539 pushq %rbp
540 pushq %rbx
541 subq $8, %rsp
542 testq %rdi, %rdi
543 je .L125
544 movq %rdi, %rbx
545 movl %esi, %r12d
546 movl %edx, %r13d
547 xorl %ebp, %ebp
548 jmp .L124
549 .p2align 4,,10
550 .p2align 3
551 .L123:
552 movq 24(%rbx), %rbx
553 testq %rbx, %rbx
554 je .L121
555 .L124:
556 testb $2, 797(%rbx)
557 jne .L123
558 movq %rbx, %rdi
559 movl %r13d, %edx
560 movl %r12d, %esi
561 call _dl_check_map_versions
562 movq 24(%rbx), %rbx
563 testl %eax, %eax
564 setne %al
565 movzbl %al, %eax
566 orl %eax, %ebp
567 testq %rbx, %rbx
568 jne .L124
569 .L121:
570 addq $8, %rsp
571 movl %ebp, %eax
572 popq %rbx
573 popq %rbp
574 popq %r12
575 popq %r13
577 .p2align 4,,10
578 .p2align 3
579 .L125:
580 addq $8, %rsp
581 xorl %ebp, %ebp
582 popq %rbx
583 movl %ebp, %eax
584 popq %rbp
585 popq %r12
586 popq %r13
588 .size _dl_check_all_versions, .-_dl_check_all_versions
589 .section .rodata.str1.8
590 .align 8
591 .type __PRETTY_FUNCTION__.9144, @object
592 .size __PRETTY_FUNCTION__.9144, 13
593 __PRETTY_FUNCTION__.9144:
594 .string "match_symbol"
595 .section .rodata.str1.16,"aMS",@progbits,1
596 .align 16
597 .type __PRETTY_FUNCTION__.9166, @object
598 .size __PRETTY_FUNCTION__.9166, 23
599 __PRETTY_FUNCTION__.9166:
600 .string "_dl_check_map_versions"
601 .hidden _dl_debug_printf
602 .hidden __assert_fail
603 .hidden strcmp
604 .hidden _dl_signal_exception
605 .hidden _itoa_word
606 .hidden _dl_name_match_p