summaryrefslogtreecommitdiff
path: root/ldso/ldso/mips/resolve.S
blob: b6dda82d79195a553e8d7392647527aa26b4f741 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
	/*
 * Linux dynamic resolving code for MIPS. Fixes up the GOT entry as
 * indicated in register t8 and jumps to the resolved address. Shamelessly
 * ripped from 'sysdeps/mips/dl-machine.h' in glibc-2.2.5.
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING.LIB" in the main directory of this archive
 * for more details.
 *
 * Copyright (C) 1996-2001 Kazumoto Kojima <kkojima@info.kanagawa-u.ac.jp>
 * Copyright (C) 2002 Steven J. Hill <sjhill@realitydiluted.com>
 *
 */
.text
.align	2
.globl	_dl_linux_resolve
.type	_dl_linux_resolve,@function
.ent	_dl_linux_resolve
_dl_linux_resolve:
	.frame	$29, 40, $31
	.set noreorder
	move	$3, $28		# Save GP
	addu	$25, 8		# t9 ($25) now points at .cpload instruction
	.cpload	$25		# Compute GP
	.set reorder
	subu	$29, 32
	.cprestore 28
	sw	$4, 16($29)
	sw	$5, 20($29)
	sw	$15, 24($29)
	move	$4, $24
	move	$5, $3
	jal     _dl_linux_resolver
	lw	$31, 24($29)
	lw	$4, 16($29)
	lw	$5, 20($29)
	addu	$29, 32
	move	$25, $2
	jr	$25
.size _dl_linux_resolve,.-_dl_linux_resolve
.end _dl_linux_resolve