1 /* PLT trampolines. SH version.
2 Copyright (C) 2005-2024 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 <https://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
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_audit_pltexit@GOTOFF
429 8: .long _dl_audit_pltexit
431 .size _dl_runtime_profile, .-_dl_runtime_profile