1 /* Copyright (C) 2003 Red Hat, Inc.
2 * Contributed by Alexandre Oliva <aoliva@redhat.com>
4 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
7 /* The function below is tail-called by resolver stubs when a
8 lazily-bound function is called. It must preserve all
9 registers that could be used to pass arguments to the actual
10 function. Upon _dl_linux_resolve entry, GR14 holds the
11 address of a lazy PLT entry, so @(GR14,-4) is the lazy
12 relocation number that we have to pass to _dl_linux_resolver.
13 GR15 holds the caller's GOT, from which we extract the
14 elf_resolve* that _dl_linux_resolver needs as well.
16 _dl_linux_resolver() figures out where the jump symbol is
17 _really_ supposed to have jumped to and returns that to us.
18 Once we have that, we prepare to tail-call the actual
19 function, clean up after ourselves, restoring the original
20 arguments, then jump to the fixed up address. */
25 .hidden _dl_linux_resolve
26 .global _dl_linux_resolve
27 .type _dl_linux_resolve,@function
30 /* Preserve arguments. */
38 /* Prepare to call _dl_linux_resolver. */
42 call _dl_linux_resolver
44 /* Move aside return value that contains the FUNCDESC_VALUE. */
47 /* Restore arguments. */
55 /* Now jump to the actual function. */
57 .size _dl_linux_resolve, . - _dl_linux_resolve