URL
https://opencores.org/ocsvn/or1k/or1k/trunk
Subversion Repositories or1k
[/] [or1k/] [trunk/] [linux/] [uClibc/] [ldso/] [ldso/] [cris/] [resolve.S] - Rev 1782
Go to most recent revision | Compare with Previous | Blame | View Log
/** This function is _not_ called directly. It is jumped to from PLT when* attempting to use a symbol that has not yet been resolved. The first* time a jump symbol (such as a function call inside a shared library)* is used (before it gets resolved) it will jump here. When we get called* the stack contains reloc_offset and tpnt is in MOF.** We save all the registers, setup R10 and R11 with the right arguments* then call _dl_linux_resolver(tpnt, reloc_offset). _dl_linux_resolver()* figures out where the jump symbol is _really_ supposed to have jumped to* and returns that to us. Once we have that, we overwrite tpnt with this* fixed up address. We then clean up after ourselves, put all the registers* back how we found them, then we jump to where the fixed up address, which* is where the jump symbol that got us here really wanted to jump to in the* first place.*/.globl _dl_linux_resolve.type _dl_linux_resolve,@function_dl_linux_resolve:push $r13push $r12push $r11push $r10push $r9push $srpmove.d [$sp+6*4],$r11move $mof,$r10#ifdef __PIC__move.d $pc,$r0sub.d .:GOTOFF,$r0move.d _dl_linux_resolver:PLTG,$r9add.d $r0,$r9jsr $r9#elsejsr _dl_linux_resolver#endifmove.d $r10,[$sp+6*4]pop $srppop $r9pop $r10pop $r11pop $r12pop $r13jump [$sp+].size _dl_linux_resolve, . - _dl_linux_resolve
Go to most recent revision | Compare with Previous | Blame | View Log
