1 /* PLT trampolines. SH version.
2 Copyright (C) 2005-2016 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
22 .globl _dl_runtime_resolve
23 .type _dl_runtime_resolve, @function
28 cfi_adjust_cfa_offset (4)
30 cfi_adjust_cfa_offset (4)
32 cfi_adjust_cfa_offset (4)
34 cfi_adjust_cfa_offset (4)
36 cfi_adjust_cfa_offset (4)
38 cfi_adjust_cfa_offset (4)
40 cfi_adjust_cfa_offset (4)
42 cfi_adjust_cfa_offset (4)
44 cfi_adjust_cfa_offset (4)
45 movt r3 ! Save T flag.
47 cfi_adjust_cfa_offset (4)
50 cfi_adjust_cfa_offset (4)
55 cfi_adjust_cfa_offset (4)
57 cfi_adjust_cfa_offset (4)
59 cfi_adjust_cfa_offset (4)
61 cfi_adjust_cfa_offset (4)
63 cfi_adjust_cfa_offset (4)
65 cfi_adjust_cfa_offset (4)
67 cfi_adjust_cfa_offset (4)
69 cfi_adjust_cfa_offset (4)
72 cfi_adjust_cfa_offset (4)
78 mov r2,r5 ! link map address
82 add r0,r2 ! Get GOT address in r2
88 jsr @r0 ! Call resolver.
89 mov r1,r6 ! reloc offset
90 lds.l @r15+,pr ! Get register content back.
91 cfi_adjust_cfa_offset (-4)
94 cfi_adjust_cfa_offset (-4)
96 cfi_adjust_cfa_offset (-4)
98 cfi_adjust_cfa_offset (-4)
100 cfi_adjust_cfa_offset (-4)
102 cfi_adjust_cfa_offset (-4)
104 cfi_adjust_cfa_offset (-4)
106 cfi_adjust_cfa_offset (-4)
108 cfi_adjust_cfa_offset (-4)
110 cfi_adjust_cfa_offset (-4)
113 cfi_adjust_cfa_offset (-4)
114 shal r3 ! Lode T flag.
116 cfi_adjust_cfa_offset (-4)
118 cfi_adjust_cfa_offset (-4)
120 cfi_adjust_cfa_offset (-4)
122 cfi_adjust_cfa_offset (-4)
124 cfi_adjust_cfa_offset (-4)
126 cfi_adjust_cfa_offset (-4)
128 cfi_adjust_cfa_offset (-4)
130 cfi_adjust_cfa_offset (-4)
131 jmp @r0 ! Jump to function address.
133 cfi_adjust_cfa_offset (-4)
136 2: .long _GLOBAL_OFFSET_TABLE_
137 3: .long _dl_fixup@GOTOFF
142 .size _dl_runtime_resolve, .-_dl_runtime_resolve
145 .globl _dl_runtime_profile
146 .type _dl_runtime_profile,@function
151 cfi_adjust_cfa_offset (4)
154 cfi_adjust_cfa_offset (4)
159 cfi_adjust_cfa_offset (4)
161 cfi_adjust_cfa_offset (4)
163 cfi_adjust_cfa_offset (4)
165 cfi_adjust_cfa_offset (4)
167 cfi_adjust_cfa_offset (4)
169 cfi_adjust_cfa_offset (4)
171 cfi_adjust_cfa_offset (4)
173 cfi_adjust_cfa_offset (4)
176 cfi_adjust_cfa_offset (36)
179 cfi_adjust_cfa_offset (4)
181 cfi_adjust_cfa_offset (4)
183 cfi_adjust_cfa_offset (4)
185 cfi_adjust_cfa_offset (4)
187 cfi_adjust_cfa_offset (4)
189 cfi_adjust_cfa_offset (4)
191 cfi_adjust_cfa_offset (4)
193 cfi_adjust_cfa_offset (4)
194 movt r3 ! Save T flag.
196 cfi_adjust_cfa_offset (4)
198 cfi_adjust_cfa_offset (4)
204 mov r2,r5 ! link map address
205 sts pr,r7 ! return address
207 cfi_adjust_cfa_offset (24)
210 mov.l r0,@r15 ! Address of the register structure
221 add r0,r12 ! Get GOT address in r12
227 jsr @r0 ! Call resolver.
228 mov r1,r6 ! reloc offset
233 cfi_adjust_cfa_offset (-24)
234 lds.l @r15+,pr ! Get register content back.
235 cfi_adjust_cfa_offset (-4)
237 cfi_adjust_cfa_offset (-4)
238 shal r3 ! Lode T flag.
240 cfi_adjust_cfa_offset (-4)
242 cfi_adjust_cfa_offset (-4)
244 cfi_adjust_cfa_offset (-4)
246 cfi_adjust_cfa_offset (-4)
248 cfi_adjust_cfa_offset (-4)
250 cfi_adjust_cfa_offset (-4)
252 cfi_adjust_cfa_offset (-4)
254 cfi_adjust_cfa_offset (-4)
257 cfi_adjust_cfa_offset (-4)
259 cfi_adjust_cfa_offset (-4)
261 cfi_adjust_cfa_offset (-4)
263 cfi_adjust_cfa_offset (-4)
265 cfi_adjust_cfa_offset (-4)
267 cfi_adjust_cfa_offset (-4)
269 cfi_adjust_cfa_offset (-4)
271 cfi_adjust_cfa_offset (-4)
273 cfi_adjust_cfa_offset (-4)
276 cfi_adjust_cfa_offset (-36)
278 jmp @r0 ! Jump to function address.
280 cfi_adjust_cfa_offset (-4)
283 2: .long _GLOBAL_OFFSET_TABLE_
284 3: .long _dl_profile_fixup@GOTOFF
286 3: .long _dl_profile_fixup
289 cfi_adjust_cfa_offset (104)
292 add r15,r3 ! Original stack
294 cfi_rel_offset (r8, 20)
330 jsr @r0 ! Call function.
333 mov.l @(12,r15),r4 ! link map address
334 mov.l @(16,r15),r5 ! reloc offset
335 mov.l @r15,r6 ! input registers
352 add r0,r12 ! Get GOT address in r12
359 mov r15,r7 ! output registers
361 cfi_adjust_cfa_offset (-4)
363 cfi_adjust_cfa_offset (-4)
366 cfi_adjust_cfa_offset (-4)
368 cfi_adjust_cfa_offset (-4)
370 cfi_adjust_cfa_offset (-8)
373 cfi_adjust_cfa_offset (-16)
375 lds.l @r15+,pr ! Get register content back.
376 cfi_adjust_cfa_offset (-4)
378 cfi_adjust_cfa_offset (-4)
379 shal r3 ! Lode T flag.
381 cfi_adjust_cfa_offset (-4)
383 cfi_adjust_cfa_offset (-4)
385 cfi_adjust_cfa_offset (-4)
387 cfi_adjust_cfa_offset (-4)
389 cfi_adjust_cfa_offset (-4)
391 cfi_adjust_cfa_offset (-4)
393 cfi_adjust_cfa_offset (-4)
395 cfi_adjust_cfa_offset (-4)
398 cfi_adjust_cfa_offset (-4)
400 cfi_adjust_cfa_offset (-4)
402 cfi_adjust_cfa_offset (-4)
404 cfi_adjust_cfa_offset (-4)
406 cfi_adjust_cfa_offset (-4)
408 cfi_adjust_cfa_offset (-4)
410 cfi_adjust_cfa_offset (-4)
412 cfi_adjust_cfa_offset (-4)
414 cfi_adjust_cfa_offset (-4)
417 cfi_adjust_cfa_offset (-36)
419 rts ! Jump to function address.
421 cfi_adjust_cfa_offset (-4)
425 7: .long _GLOBAL_OFFSET_TABLE_
426 8: .long _dl_call_pltexit@GOTOFF
428 8: .long _dl_call_pltexit
430 .size _dl_runtime_profile, .-_dl_runtime_profile