_init_env unresolvable : ps4_stub_lib_maker_v2\lib\libSceLibcInternal\libSceLibcInternal.def: 294 #2

Closed
opened 2019-01-01 20:18:22 -06:00 by dmiller423 · 7 comments
dmiller423 commented 2019-01-01 20:18:22 -06:00 (Migrated from github.com)
#
# A user thread receives a fatal signal
#
# exception: 0xa0020101 (PRX_NOT_RESOLVED_FUNCTION)
# thread ID: 101423
# thread name: eboot.bin
# proc ID: 129
# proc name: eboot.bin
# proxied exception (Check generated coredump)
#
# registers:
# rax: 0000000000000000  rbx: 0000000800029790
# rcx: 0000000000000000  rdx: 0000000000000000
# rsi: 0000000800029790  rdi: 00000007eeffadd0
# rbp: 00000007eeffad80  rsp: 00000007eeffad80
# r8 : 0000000000000000  r9 : 0000000000000000
# r10: 0000000000000000  r11: 0000000000000000
# r12: 0000000000000000  r13: 0000000000000000
# r14: 0000000000000001  r15: 00000007eeffadd8
# rip: 000000080002e6c4  eflags: 00010246
# BrF: 0000000000ad2690  BrT: 000000080002e6c0
#
# backtrace:
copyin: eboot.bin has nonsleeping lock
# 0000000000ad13e9
# 0000000000000000
#
# dynamic libraries:
# /app0/eboot.bin
#  text: 0000000000400000:0000000000b10000 r-x
#  data: 0000000000b14000:00000000023ec000 rw-
#  fingerprint: 784ae2c3deed598e333c04751007441600000000
# /oeJOs5SABx/common/lib/libkernel_sys.sprx
#  text: 0000000800000000:0000000800050000 r-x
#  data: 0000000800054000:000000080008c000 rw-
#  fingerprint: acb4cbd4022409ae6ec4d8ff06f2fca500000000
# /oeJOs5SABx/common/lib/libSceLibcInternal.sprx
#  text: 000000080008c000:0000000800190000 r-x
#  data: 0000000800198000:00000008001b8000 rw-
#  fingerprint: 6cfb1a5e5ffc646e94f333e5169b663300000000
# /oeJOs5SABx/common/lib/libSceSysmodule.sprx
#  text: 00000008001b8000:00000008001c4000 r-x
#  data: 00000008001c8000:00000008001d4000 rw-
#  fingerprint: 53e8d6ed1d237b85e94158cdbc6a9b1200000000
#
# === Call to unpatched function is detected!!! ===
# Module Path    : /app0/eboot.bin
# Caller Address : 0x0000000000ad2690
# Required Module Name    : libc
# Required Library Name   : libc
# Required Function NID   : 0x6F3404C72D7CF592
!!! You can find the symbol name corresponding to the NID by scanning the result of following command
!!! > orbis-bin.exe -ds .scenid <stub file>
mDBG: Sending signal(pid: 129, tid: 101423, signo: 0xa0020101)
``` # # A user thread receives a fatal signal # # exception: 0xa0020101 (PRX_NOT_RESOLVED_FUNCTION) # thread ID: 101423 # thread name: eboot.bin # proc ID: 129 # proc name: eboot.bin # proxied exception (Check generated coredump) # # registers: # rax: 0000000000000000 rbx: 0000000800029790 # rcx: 0000000000000000 rdx: 0000000000000000 # rsi: 0000000800029790 rdi: 00000007eeffadd0 # rbp: 00000007eeffad80 rsp: 00000007eeffad80 # r8 : 0000000000000000 r9 : 0000000000000000 # r10: 0000000000000000 r11: 0000000000000000 # r12: 0000000000000000 r13: 0000000000000000 # r14: 0000000000000001 r15: 00000007eeffadd8 # rip: 000000080002e6c4 eflags: 00010246 # BrF: 0000000000ad2690 BrT: 000000080002e6c0 # # backtrace: copyin: eboot.bin has nonsleeping lock # 0000000000ad13e9 # 0000000000000000 # # dynamic libraries: # /app0/eboot.bin # text: 0000000000400000:0000000000b10000 r-x # data: 0000000000b14000:00000000023ec000 rw- # fingerprint: 784ae2c3deed598e333c04751007441600000000 # /oeJOs5SABx/common/lib/libkernel_sys.sprx # text: 0000000800000000:0000000800050000 r-x # data: 0000000800054000:000000080008c000 rw- # fingerprint: acb4cbd4022409ae6ec4d8ff06f2fca500000000 # /oeJOs5SABx/common/lib/libSceLibcInternal.sprx # text: 000000080008c000:0000000800190000 r-x # data: 0000000800198000:00000008001b8000 rw- # fingerprint: 6cfb1a5e5ffc646e94f333e5169b663300000000 # /oeJOs5SABx/common/lib/libSceSysmodule.sprx # text: 00000008001b8000:00000008001c4000 r-x # data: 00000008001c8000:00000008001d4000 rw- # fingerprint: 53e8d6ed1d237b85e94158cdbc6a9b1200000000 # # === Call to unpatched function is detected!!! === # Module Path : /app0/eboot.bin # Caller Address : 0x0000000000ad2690 # Required Module Name : libc # Required Library Name : libc # Required Function NID : 0x6F3404C72D7CF592 !!! You can find the symbol name corresponding to the NID by scanning the result of following command !!! > orbis-bin.exe -ds .scenid <stub file> mDBG: Sending signal(pid: 129, tid: 101423, signo: 0xa0020101) ```
dmiller423 commented 2019-01-01 20:31:42 -06:00 (Migrated from github.com)

The above happens with anything built with the generated stubs that links to piglet, Including ps4_gl_test.

Seeing how the stubs only take input from the def files provided i'm at a loss as to how mine would be different. My build process is slightly different since I'm not using wine, but it works as other things that don't link with the stubs work.

It doesn't really matter if loaded from spawn code / payload ldr or pkg, IE: it's not the sceKernelLoadStartModule() , It's the SCE rld for .self.

The above happens with anything built with the generated stubs that links to piglet, Including ps4_gl_test. Seeing how the stubs only take input from the def files provided i'm at a loss as to how mine would be different. My build process is slightly different since I'm not using wine, but it works as other things that don't link with the stubs work. It doesn't really matter if loaded from spawn code / payload ldr or pkg, IE: it's not the sceKernelLoadStartModule() , It's the SCE rld for .self.
dmiller423 commented 2019-01-02 12:00:08 -06:00 (Migrated from github.com)

This was a combination of small problems, it appears to have been using the libc stub from sce and not the junction/symlink to SceLibcInternal.

This was a combination of small problems, it appears to have been using the libc stub from sce and not the junction/symlink to SceLibcInternal.
dmiller423 commented 2019-01-04 20:13:43 -06:00 (Migrated from github.com)

I didn't want to reopen, as I figured it out last time, however:

# === Call to unpatched function is detected!!! ===
# Module Path    : /app0/eboot.bin
# Caller Address : 0x000000000049eaf0
# Required Module Name    : libScePad
# Required Library Name   : libScePad
# Required Function NID   : 0x86FD65BA226BA903

orbis-bin.exe -ds .scenid ./target/lib/libScePad_stub_weak.a | grep 86FD65BA226BA903
0x86FD65BA226BA903  scePadInit

It does not care to be mixed with specific? system lib stubs..
This is not at rld, it is on call to the scePadInit().
I have checked and none of the defs conflict with scePad*, however:
The behavior doesn't make sense to me at all, If I build without tauon stubs (and GLES) it runs.

I didn't want to reopen, as I figured it out last time, however: ``` # === Call to unpatched function is detected!!! === # Module Path : /app0/eboot.bin # Caller Address : 0x000000000049eaf0 # Required Module Name : libScePad # Required Library Name : libScePad # Required Function NID : 0x86FD65BA226BA903 orbis-bin.exe -ds .scenid ./target/lib/libScePad_stub_weak.a | grep 86FD65BA226BA903 0x86FD65BA226BA903 scePadInit ``` It does not care to be mixed with specific? system lib stubs.. This is not at rld, it is on call to the scePadInit(). I have checked and none of the defs conflict with scePad*, however: The behavior doesn't make sense to me at all, If I build without tauon stubs (and GLES) it runs.
flatz commented 2019-01-05 05:57:20 -06:00 (Migrated from github.com)

Try to use at main(...):

#define SCE_SYSMODULE_INTERNAL_PAD 0x80000024

//...

ret = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_PAD);
if (ret) {
	EPRINTF("sceSysmoduleLoadModuleInternal(%s) failed: 0x%08X\n", STRINGIFY(SCE_SYSMODULE_INTERNAL_PAD), ret);
	goto err;
}
Try to use at `main(...)`: ``` #define SCE_SYSMODULE_INTERNAL_PAD 0x80000024 //... ret = sceSysmoduleLoadModuleInternal(SCE_SYSMODULE_INTERNAL_PAD); if (ret) { EPRINTF("sceSysmoduleLoadModuleInternal(%s) failed: 0x%08X\n", STRINGIFY(SCE_SYSMODULE_INTERNAL_PAD), ret); goto err; } ```
dmiller423 commented 2019-01-05 08:34:53 -06:00 (Migrated from github.com)

This does appear to be a solution, or at least a workaround, thank you.
It seems it's needed for the default stubs to link now, any chance on an explanation on what it changes
that causes RLD not to automatically link in sce modules?

This does appear to be a solution, or at least a workaround, thank you. It seems it's needed for the default stubs to link now, any chance on an explanation on what it changes that causes RLD not to automatically link in sce modules?
flatz commented 2019-01-05 14:55:17 -06:00 (Migrated from github.com)

Not sure, maybe it's due to system application or weak stub. I never tried to find what's cause this issue. Original system applications use the same way to handle imports.

Not sure, maybe it's due to system application or weak stub. I never tried to find what's cause this issue. Original system applications use the same way to handle imports.
dmiller423 commented 2019-01-06 10:01:49 -06:00 (Migrated from github.com)

fair enough, thanks for the response

fair enough, thanks for the response
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-flatz/ps4_stub_lib_maker_v2#2
No description provided.