Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / rt / rt-unwind-resume.shared.s
blobfe5acba2b1de8e3b15ef1970b1a9eb3de7d5b96b
1 .text
2 .section .rodata.str1.1,"aMS",@progbits,1
3 .LC0:
4 .string "libgcc_s.so.1"
5 .section .rodata.str1.8,"aMS",@progbits,1
6 .align 8
7 .LC1:
8 .string "libgcc_s.so.1 must be installed for unwinding to work\n"
9 .section .rodata.str1.1
10 .LC2:
11 .string "_Unwind_Resume"
12 .LC3:
13 .string "__gcc_personality_v0"
14 .section .text.unlikely,"ax",@progbits
15 .globl __libgcc_s_init
16 .hidden __libgcc_s_init
17 .type __libgcc_s_init, @function
18 __libgcc_s_init:
19 pushq %rbp
20 pushq %rbx
21 leaq .LC0(%rip), %rdi
22 movl $-2147483646, %esi
23 subq $8, %rsp
24 call __libc_dlopen_mode@PLT
25 testq %rax, %rax
26 jne .L2
27 .L3:
28 leaq .LC1(%rip), %rdi
29 call __libc_fatal@PLT
30 .L2:
31 leaq .LC2(%rip), %rsi
32 movq %rax, %rdi
33 movq %rax, %rbp
34 call __libc_dlsym@PLT
35 testq %rax, %rax
36 movq %rax, %rbx
37 je .L3
38 leaq .LC3(%rip), %rsi
39 movq %rbp, %rdi
40 call __libc_dlsym@PLT
41 testq %rax, %rax
42 je .L3
43 movq %rbx, %rdx
44 #APP
45 # 52 "../sysdeps/gnu/unwind-resume.c" 1
46 xor %fs:48, %rax
47 rol $2*8+1, %rax
48 # 0 "" 2
49 # 48 "../sysdeps/gnu/unwind-resume.c" 1
50 xor %fs:48, %rdx
51 rol $2*8+1, %rdx
52 # 0 "" 2
53 #NO_APP
54 movq %rax, libgcc_s_personality(%rip)
55 movq %rdx, __libgcc_s_resume(%rip)
56 popq %rax
57 popq %rbx
58 popq %rbp
59 ret
60 .size __libgcc_s_init, .-__libgcc_s_init
61 .text
62 .p2align 4,,15
63 .globl _Unwind_Resume
64 .type _Unwind_Resume, @function
65 _Unwind_Resume:
66 subq $24, %rsp
67 movq __libgcc_s_resume(%rip), %rax
68 testq %rax, %rax
69 je .L15
70 .L13:
71 #APP
72 # 66 "../sysdeps/gnu/unwind-resume.c" 1
73 ror $2*8+1, %rax
74 xor %fs:48, %rax
75 # 0 "" 2
76 #NO_APP
77 call *%rax
78 .p2align 4,,10
79 .p2align 3
80 .L15:
81 movq %rdi, 8(%rsp)
82 call __libgcc_s_init
83 movq __libgcc_s_resume(%rip), %rax
84 movq 8(%rsp), %rdi
85 jmp .L13
86 .size _Unwind_Resume, .-_Unwind_Resume
87 .p2align 4,,15
88 .globl __gcc_personality_v0
89 .type __gcc_personality_v0, @function
90 __gcc_personality_v0:
91 subq $40, %rsp
92 movq libgcc_s_personality(%rip), %rax
93 testq %rax, %rax
94 je .L19
95 .L17:
96 #APP
97 # 80 "../sysdeps/gnu/unwind-resume.c" 1
98 ror $2*8+1, %rax
99 xor %fs:48, %rax
100 # 0 "" 2
101 #NO_APP
102 addq $40, %rsp
103 jmp *%rax
104 .p2align 4,,10
105 .p2align 3
106 .L19:
107 movq %r8, 24(%rsp)
108 movq %rcx, 16(%rsp)
109 movq %rdx, 8(%rsp)
110 movl %esi, 4(%rsp)
111 movl %edi, (%rsp)
112 call __libgcc_s_init
113 movq libgcc_s_personality(%rip), %rax
114 movq 24(%rsp), %r8
115 movq 16(%rsp), %rcx
116 movq 8(%rsp), %rdx
117 movl 4(%rsp), %esi
118 movl (%rsp), %edi
119 jmp .L17
120 .size __gcc_personality_v0, .-__gcc_personality_v0
121 .local libgcc_s_personality
122 .comm libgcc_s_personality,8,8
123 .hidden __libgcc_s_resume
124 .comm __libgcc_s_resume,8,8