1 /* PLT trampolines. Sparc 32-bit 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, see
17 <http://www.gnu.org/licenses/>. */
24 /* %g1: PLT offset loaded by PLT entry
25 * %g2: callers PC, which is PLT0 + 4, and we store the
26 * link map at PLT0 + 12, therefore we add 8 to get
27 * the address of the link map
29 .globl _dl_runtime_resolve
30 .type _dl_runtime_resolve, @function
35 cfi_def_cfa_register(%fp)
37 cfi_register (%o7, %i7)
48 .size _dl_runtime_resolve, .-_dl_runtime_resolve
50 /* For the profiling cases we pass in our stack frame
51 * as the base of the La_sparc64_regs, so it looks
61 * framesize %sp + (32 * 8)
64 .globl _dl_profile_save_regs
65 .type _dl_profile_save_regs, @function
66 _dl_profile_save_regs:
69 std %l0, [%sp + ( 0 * 8)]
70 std %l2, [%sp + ( 1 * 8)]
71 std %l4, [%sp + ( 2 * 8)]
72 std %l6, [%sp + ( 3 * 8)]
73 std %i0, [%sp + ( 4 * 8)]
74 std %i2, [%sp + ( 5 * 8)]
75 std %i4, [%sp + ( 6 * 8)]
76 std %i6, [%sp + ( 7 * 8)]
77 ld [%sp + (8 * 8)], %l4
79 st %l4, [%sp + (8 * 8)]
83 .size _dl_profile_save_regs, .-_dl_profile_save_regs
85 /* If we are going to call pltexit, then we must replicate
86 * the caller's stack frame.
87 * %o0: PLT resolved function address
89 .globl _dl_profile_invoke
90 .type _dl_profile_invoke, @function
116 std %o0, [%sp + ( 9 * 8)]
117 std %f0, [%sp + (10 * 8)]
122 call _dl_call_pltexit
123 add %sp, (16 * 8), %o3
125 ldd [%sp + (9 * 8)], %i0
132 .size _dl_profile_invoke, .-_dl_profile_invoke
134 /* %g1: PLT offset loaded by PLT entry
135 * %g2: callers PC, which is PLT0 + 4, and we store the
136 * link map at PLT0 + 12, therefore we add 8 to get
137 * the address of the link map
140 .globl _dl_runtime_profile
141 .type _dl_runtime_profile, @function
149 1: save %sp, -104, %sp
150 cfi_def_cfa_register(%fp)
152 cfi_register(%o7, %i7)
163 call _dl_profile_save_regs
167 call _dl_profile_fixup
168 add %sp, (9 * 8), %o4
170 ld [%sp + (9 * 8)], %o1
175 call _dl_profile_invoke
183 .size _dl_runtime_profile, .-_dl_runtime_profile