1 /* PLT trampolines. SH version.
2 Copyright (C) 2005 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 .globl _dl_runtime_resolve
24 .type _dl_runtime_resolve, @function
29 cfi_adjust_cfa_offset (4)
31 cfi_adjust_cfa_offset (4)
33 cfi_adjust_cfa_offset (4)
35 cfi_adjust_cfa_offset (4)
37 cfi_adjust_cfa_offset (4)
39 cfi_adjust_cfa_offset (4)
41 cfi_adjust_cfa_offset (4)
43 cfi_adjust_cfa_offset (4)
45 cfi_adjust_cfa_offset (4)
46 movt r3 ! Save T flag.
48 cfi_adjust_cfa_offset (4)
51 cfi_adjust_cfa_offset (4)
56 cfi_adjust_cfa_offset (4)
58 cfi_adjust_cfa_offset (4)
60 cfi_adjust_cfa_offset (4)
62 cfi_adjust_cfa_offset (4)
64 cfi_adjust_cfa_offset (4)
66 cfi_adjust_cfa_offset (4)
68 cfi_adjust_cfa_offset (4)
70 cfi_adjust_cfa_offset (4)
73 cfi_adjust_cfa_offset (4)
79 mov r2,r5 ! link map address
83 add r0,r2 ! Get GOT address in r2
89 jsr @r0 ! Call resolver.
90 mov r1,r6 ! reloc offset
91 lds.l @r15+,pr ! Get register content back.
92 cfi_adjust_cfa_offset (-4)
95 cfi_adjust_cfa_offset (-4)
97 cfi_adjust_cfa_offset (-4)
99 cfi_adjust_cfa_offset (-4)
101 cfi_adjust_cfa_offset (-4)
103 cfi_adjust_cfa_offset (-4)
105 cfi_adjust_cfa_offset (-4)
107 cfi_adjust_cfa_offset (-4)
109 cfi_adjust_cfa_offset (-4)
111 cfi_adjust_cfa_offset (-4)
114 cfi_adjust_cfa_offset (-4)
115 shal r3 ! Lode T flag.
117 cfi_adjust_cfa_offset (-4)
119 cfi_adjust_cfa_offset (-4)
121 cfi_adjust_cfa_offset (-4)
123 cfi_adjust_cfa_offset (-4)
125 cfi_adjust_cfa_offset (-4)
127 cfi_adjust_cfa_offset (-4)
129 cfi_adjust_cfa_offset (-4)
131 cfi_adjust_cfa_offset (-4)
132 jmp @r0 ! Jump to function address.
134 cfi_adjust_cfa_offset (-4)
137 2: .long _GLOBAL_OFFSET_TABLE_
138 3: .long _dl_fixup@GOTOFF
143 .size _dl_runtime_resolve, .-_dl_runtime_resolve
146 .globl _dl_runtime_profile
147 .type _dl_runtime_profile,@function
152 cfi_adjust_cfa_offset (4)
155 cfi_adjust_cfa_offset (4)
160 cfi_adjust_cfa_offset (4)
162 cfi_adjust_cfa_offset (4)
164 cfi_adjust_cfa_offset (4)
166 cfi_adjust_cfa_offset (4)
168 cfi_adjust_cfa_offset (4)
170 cfi_adjust_cfa_offset (4)
172 cfi_adjust_cfa_offset (4)
174 cfi_adjust_cfa_offset (4)
177 cfi_adjust_cfa_offset (36)
180 cfi_adjust_cfa_offset (4)
182 cfi_adjust_cfa_offset (4)
184 cfi_adjust_cfa_offset (4)
186 cfi_adjust_cfa_offset (4)
188 cfi_adjust_cfa_offset (4)
190 cfi_adjust_cfa_offset (4)
192 cfi_adjust_cfa_offset (4)
194 cfi_adjust_cfa_offset (4)
195 movt r3 ! Save T flag.
197 cfi_adjust_cfa_offset (4)
199 cfi_adjust_cfa_offset (4)
205 mov r2,r5 ! link map address
206 sts pr,r7 ! return address
208 cfi_adjust_cfa_offset (24)
211 mov.l r0,@r15 ! Address of the register structure
222 add r0,r12 ! Get GOT address in r12
228 jsr @r0 ! Call resolver.
229 mov r1,r6 ! reloc offset
234 cfi_adjust_cfa_offset (-24)
235 lds.l @r15+,pr ! Get register content back.
236 cfi_adjust_cfa_offset (-4)
238 cfi_adjust_cfa_offset (-4)
239 shal r3 ! Lode T flag.
241 cfi_adjust_cfa_offset (-4)
243 cfi_adjust_cfa_offset (-4)
245 cfi_adjust_cfa_offset (-4)
247 cfi_adjust_cfa_offset (-4)
249 cfi_adjust_cfa_offset (-4)
251 cfi_adjust_cfa_offset (-4)
253 cfi_adjust_cfa_offset (-4)
255 cfi_adjust_cfa_offset (-4)
258 cfi_adjust_cfa_offset (-4)
260 cfi_adjust_cfa_offset (-4)
262 cfi_adjust_cfa_offset (-4)
264 cfi_adjust_cfa_offset (-4)
266 cfi_adjust_cfa_offset (-4)
268 cfi_adjust_cfa_offset (-4)
270 cfi_adjust_cfa_offset (-4)
272 cfi_adjust_cfa_offset (-4)
274 cfi_adjust_cfa_offset (-4)
277 cfi_adjust_cfa_offset (-36)
279 jmp @r0 ! Jump to function address.
281 cfi_adjust_cfa_offset (-4)
284 2: .long _GLOBAL_OFFSET_TABLE_
285 3: .long _dl_profile_fixup@GOTOFF
287 3: .long _dl_profile_fixup
290 cfi_adjust_cfa_offset (104)
293 add r15,r3 ! Original stack
295 cfi_rel_offset (r8, 20)
331 jsr @r0 ! Call function.
334 mov.l @(12,r15),r4 ! link map address
335 mov.l @(16,r15),r5 ! reloc offset
336 mov.l @r15,r6 ! input registers
353 add r0,r12 ! Get GOT address in r12
360 mov r15,r7 ! output registers
362 cfi_adjust_cfa_offset (-4)
364 cfi_adjust_cfa_offset (-4)
367 cfi_adjust_cfa_offset (-4)
369 cfi_adjust_cfa_offset (-4)
371 cfi_adjust_cfa_offset (-8)
374 cfi_adjust_cfa_offset (-16)
376 lds.l @r15+,pr ! Get register content back.
377 cfi_adjust_cfa_offset (-4)
379 cfi_adjust_cfa_offset (-4)
380 shal r3 ! Lode T flag.
382 cfi_adjust_cfa_offset (-4)
384 cfi_adjust_cfa_offset (-4)
386 cfi_adjust_cfa_offset (-4)
388 cfi_adjust_cfa_offset (-4)
390 cfi_adjust_cfa_offset (-4)
392 cfi_adjust_cfa_offset (-4)
394 cfi_adjust_cfa_offset (-4)
396 cfi_adjust_cfa_offset (-4)
399 cfi_adjust_cfa_offset (-4)
401 cfi_adjust_cfa_offset (-4)
403 cfi_adjust_cfa_offset (-4)
405 cfi_adjust_cfa_offset (-4)
407 cfi_adjust_cfa_offset (-4)
409 cfi_adjust_cfa_offset (-4)
411 cfi_adjust_cfa_offset (-4)
413 cfi_adjust_cfa_offset (-4)
415 cfi_adjust_cfa_offset (-4)
418 cfi_adjust_cfa_offset (-36)
420 rts ! Jump to function address.
422 cfi_adjust_cfa_offset (-4)
426 7: .long _GLOBAL_OFFSET_TABLE_
427 8: .long _dl_call_pltexit@GOTOFF
429 8: .long _dl_call_pltexit
431 .size _dl_runtime_profile, .-_dl_runtime_profile