about summary refs log tree commit diff
path: root/src/ldso/mipsn32/dlsym.s
blob: 1c82da300336556bbde2db2d902187ecb6e07752 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
.set	noreorder
.global	dlsym
.hidden	__dlsym
.type	dlsym,@function
dlsym:
	lui	$3, %hi(%neg(%gp_rel(dlsym)))
	addiu	$3, $3, %lo(%neg(%gp_rel(dlsym)))
	addu	$3, $3, $25
	move	$6, $ra
	lw	$25, %got_disp(__dlsym)($3)
	addiu	$sp, $sp, -32
	sd	$ra, 16($sp)
	jalr	$25
	nop
	ld	$ra, 16($sp)
	jr	$ra
	addiu	$sp, $sp, 32