OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [linux/] [uClibc/] [ldso/] [ldso/] [cris/] [resolve.S] - Blame information for rev 1325

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1325 phoenix
/*
2
 * This function is _not_ called directly.  It is jumped to from PLT when
3
 * attempting to use a symbol that has not yet been resolved.  The first
4
 * time a jump symbol (such as a function call inside a shared library)
5
 * is used (before it gets resolved) it will jump here.  When we get called
6
 * the stack contains reloc_offset and tpnt is in MOF.
7
 *
8
 * We save all the registers, setup R10 and R11 with the right arguments
9
 * then call _dl_linux_resolver(tpnt, reloc_offset). _dl_linux_resolver()
10
 * figures out where the jump symbol is _really_ supposed to have jumped to
11
 * and returns that to us.  Once we have that, we overwrite tpnt with this
12
 * fixed up address. We then clean up after ourselves, put all the registers
13
 * back how we found them, then we jump to where the fixed up address, which
14
 * is where the jump symbol that got us here really wanted to jump to in the
15
 * first place.
16
 */
17
 
18
.globl _dl_linux_resolve
19
.type _dl_linux_resolve,@function
20
 
21
_dl_linux_resolve:
22
        push $r13
23
        push $r12
24
        push $r11
25
        push $r10
26
        push $r9
27
        push $srp
28
        move.d [$sp+6*4],$r11
29
        move $mof,$r10
30
#ifdef __PIC__
31
        move.d $pc,$r0
32
        sub.d .:GOTOFF,$r0
33
        move.d _dl_linux_resolver:PLTG,$r9
34
        add.d $r0,$r9
35
        jsr $r9
36
#else
37
        jsr _dl_linux_resolver
38
#endif
39
        move.d $r10,[$sp+6*4]
40
        pop $srp
41
        pop $r9
42
        pop $r10
43
        pop $r11
44
        pop $r12
45
        pop $r13
46
        jump [$sp+]
47
 
48
        .size _dl_linux_resolve, . - _dl_linux_resolve

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.