diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-12-30 14:56:55 +0100 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2021-12-30 14:56:55 +0100 |
| commit | ba03884e3d52d47a4fa1b474ca7dc6b419ee6898 (patch) | |
| tree | a5e711b2bbc6980b8f06af21cca02a6823757168 /libpsn00b/psxetc/_dl_resolve_wrapper.s | |
| parent | fe42ce7f1c98947baa49427835deb5ce70470afb (diff) | |
| download | psn00bsdk-ba03884e3d52d47a4fa1b474ca7dc6b419ee6898.tar.gz | |
Refactor dynamic linker API, fix system/dynlink example
Diffstat (limited to 'libpsn00b/psxetc/_dl_resolve_wrapper.s')
| -rw-r--r-- | libpsn00b/psxetc/_dl_resolve_wrapper.s | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libpsn00b/psxetc/_dl_resolve_wrapper.s b/libpsn00b/psxetc/_dl_resolve_wrapper.s index 069ee84..7f1132b 100644 --- a/libpsn00b/psxetc/_dl_resolve_wrapper.s +++ b/libpsn00b/psxetc/_dl_resolve_wrapper.s @@ -4,7 +4,7 @@ # This function is called by the lazy loader stubs generated by GCC in the # .plt/.MIPS.stubs section when attempting to call a GOT entry whose address # hasn't yet been resolved. The generated stubs conform to the MIPS ABI and -# uses the following registers to pass the following parameters: +# uses the following registers: # - $t7 = address the resolved function should return to (i.e. $ra of the # caller that triggered the stub) # - $t8 = index of the function in the .dynsym symbol table @@ -25,13 +25,13 @@ _dl_resolve_wrapper: # Figure out where the DLL's struct is. dlinit() places a pointer to the # struct in the second GOT entry, so it's just a matter of indexing the GOT - # using GP. Then call _dl_resolve_helper with the struct and $t8 as + # using $gp. Then call _dl_resolve_helper with the struct and $t8 as # arguments, and store the return value into $t0. - lw $a0, -0x7fec($gp) # sizeof(uint32_t) - 0x7ff0 (see dll.ld) + lw $a0, -0x7fec($gp) # (DLL *) sizeof(uint32_t) - 0x7ff0 [see dll.ld] move $a1, $t8 jal _dl_resolve_helper - addiu $sp, -8 # (branch delay) + addiu $sp, -8 addiu $sp, 8 move $t0, $v0 |
