2 * Copyright (C) 2013 Synopsys, Inc. (www.synopsys.com)
4 * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
8 #include <sys/syscall.h>
10 ; Save the registers which resolver could possibly clobber
11 ; r0-r9: args to the function - symbol being resolved
12 ; r10-r12 are already clobbered by PLTn, PLT0 thus neednot be saved
14 .macro SAVE_CALLER_SAVED
28 .macro RESTORE_CALLER_SAVED_BUT_R0
41 ; Upon entry, PLTn, which led us here, sets up the following regs
42 ; r11 = Module info (tpnt pointer as expected by resolver)
43 ; r12 = PC of the PLTn itself - needed by resolver to find
44 ; corresponding .rela.plt entry
46 ENTRY(_dl_linux_resolve)
47 ; args to func being resolved, which resolver might clobber
51 bl.d _dl_linux_resolver
54 RESTORE_CALLER_SAVED_BUT_R0
55 j_s.d [r0] ; r0 has resolved function addr
56 pop_s r0 ; restore first arg to resolved call
57 END(_dl_linux_resolve)