feat(libkernel): add sceKernelGetLibkernelTextLocation (AmJ0mn2l4lM) #4675

Closed
nabilfp wants to merge 1 commit from upstream-pr/4675 into main
nabilfp commented 2026-10-12 18:33:57 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nabilfp on 2026-10-12T18:33:57Z.


What

Adds sceKernelGetLibkernelTextLocation (NID AmJ0mn2l4lM) to libkernel. The function returns the text segment location (address and size) of the libkernel module.

Signature from fpPS4: int sceKernelGetLibkernelTextLocation(uint64_t* address, uint64_t* size), returns 0 on success.

Implementation:

  • On Windows: uses GetModuleHandleW("libkernel.dll") (fallback to main module) and reads PE headers to get base address and image size.
  • On non-Windows: uses dladdr to find the libkernel module's base from the function's own address, then iterates program headers to locate the executable LOAD segment (PT_LOAD with PF_X) and returns its address and memsz.

Null checks return SCE_KERNEL_ERROR_EFAULT; missing module/segment returns SCE_KERNEL_ERROR_ESRCH.

This resolves the unresolved import reported in #4560.

Tested

  • python tools/check_conventions.py --base origin/main passes.
  • python tools/nid_names.py --nid AmJ0mn2l4lM now reports "already-implemented".

No build/tests were run locally due to environment constraints; the change follows existing code patterns in the codebase (ModuleInfo, etc.).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4833501593 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675). Originally posted by [nabilfp](https://github.com/nabilfp) on 2026-10-12T18:33:57Z. --- ### What Adds `sceKernelGetLibkernelTextLocation` (NID `AmJ0mn2l4lM`) to libkernel. The function returns the text segment location (address and size) of the libkernel module. Signature from fpPS4: `int sceKernelGetLibkernelTextLocation(uint64_t* address, uint64_t* size)`, returns 0 on success. Implementation: - On Windows: uses `GetModuleHandleW("libkernel.dll")` (fallback to main module) and reads PE headers to get base address and image size. - On non-Windows: uses `dladdr` to find the libkernel module's base from the function's own address, then iterates program headers to locate the executable LOAD segment (PT_LOAD with PF_X) and returns its address and memsz. Null checks return `SCE_KERNEL_ERROR_EFAULT`; missing module/segment returns `SCE_KERNEL_ERROR_ESRCH`. This resolves the unresolved import reported in #4560. ### Tested - `python tools/check_conventions.py --base origin/main` passes. - `python tools/nid_names.py --nid AmJ0mn2l4lM` now reports "already-implemented". No build/tests were run locally due to environment constraints; the change follows existing code patterns in the codebase (ModuleInfo, etc.). ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: none - [x] AI-assisted: yes
fma-rc commented 2026-10-12 18:40:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-12T18:40:06Z.


@nabilfp fyi your commit is attributed to 'Test Contributor', not your github account. Haven't reviewed the PR.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130385222 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#issuecomment-6130385222). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-12T18:40:06Z. --- @nabilfp fyi your commit is attributed to 'Test Contributor', not your github account. Haven't reviewed the PR.
MarcZX10 commented 2026-10-12 19:13:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T19:13:43Z.

Code review location: core/libs/prx/libkernel/Module/src/Module.cpp; line 263

@@ -248,4 +248,64 @@ std::int32_t APS5_VABI sceKernelInternalMemoryGetModuleSegmentInfo_nid_postfix(v
     return 0;
 }
 
+int APS5_VABI sceKernelGetLibkernelTextLocation_nid_postfix(std::uint64_t* address, std::uint64_t* size) {
+    if (address == nullptr || size == nullptr) {
+        return SCE_KERNEL_ERROR_EFAULT;
+    }
+#ifdef _WIN32
+    HMODULE module = GetModuleHandleW(L"libkernel.dll");
+    if (module == nullptr) {
+        module = GetModuleHandleW(nullptr);
+    }
+    if (module == nullptr) {
+        return SCE_KERNEL_ERROR_ESRCH;
+    }
+    MEMORY_BASIC_INFORMATION mbi{};

The Windows CMake target is emitted as libkernel.prx (the shared-library loop sets SUFFIX .prx), so GetModuleHandleW(L"libkernel.dll") will not find this module. The fallback GetModuleHandleW(nullptr) then returns the host executable, making the function report the wrong module. Also, SizeOfImage is the entire PE image rather than its executable text range. Could this locate the containing module from this function’s address (for example with GetModuleHandleEx(FROM_ADDRESS)) and return the .text section address/size?

<!-- greyfinch-sync:boykopovar/AnyPS5:review-comment:4251511653 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#discussion_r4251511653). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-12T19:13:43Z. **Code review location:** `core/libs/prx/libkernel/Module/src/Module.cpp`; line 263 ~~~~diff @@ -248,4 +248,64 @@ std::int32_t APS5_VABI sceKernelInternalMemoryGetModuleSegmentInfo_nid_postfix(v return 0; } +int APS5_VABI sceKernelGetLibkernelTextLocation_nid_postfix(std::uint64_t* address, std::uint64_t* size) { + if (address == nullptr || size == nullptr) { + return SCE_KERNEL_ERROR_EFAULT; + } +#ifdef _WIN32 + HMODULE module = GetModuleHandleW(L"libkernel.dll"); + if (module == nullptr) { + module = GetModuleHandleW(nullptr); + } + if (module == nullptr) { + return SCE_KERNEL_ERROR_ESRCH; + } + MEMORY_BASIC_INFORMATION mbi{}; ~~~~ --- The Windows CMake target is emitted as `libkernel.prx` (the shared-library loop sets `SUFFIX .prx`), so `GetModuleHandleW(L"libkernel.dll")` will not find this module. The fallback `GetModuleHandleW(nullptr)` then returns the host executable, making the function report the wrong module. Also, `SizeOfImage` is the entire PE image rather than its executable text range. Could this locate the containing module from this function’s address (for example with `GetModuleHandleEx(FROM_ADDRESS)`) and return the `.text` section address/size?
MarcZX10 commented 2026-10-12 19:17:18 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T19:17:18Z.

Review: COMMENTED


The overlap report is substantive: #4567 is still open and implements the same sceKernelGetLibkernelTextLocation export/NID. The two PRs also choose different targets: #4567 returns the main executable’s first segment (following fpPS4), while this PR tries to report libkernel’s own text. They cannot both be merged as written, and the console behavior is still unverified. Could you coordinate with #4567’s author and establish the expected target from an observed call/result or other authoritative evidence, then mark the chosen PR as depending on any shared changes? Also, the Windows lookup issue from my inline comment remains.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5495062674 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#pullrequestreview-5495062674). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-12T19:17:18Z. **Review:** COMMENTED --- The overlap report is substantive: #4567 is still open and implements the same `sceKernelGetLibkernelTextLocation` export/NID. The two PRs also choose different targets: #4567 returns the main executable’s first segment (following fpPS4), while this PR tries to report libkernel’s own text. They cannot both be merged as written, and the console behavior is still unverified. Could you coordinate with #4567’s author and establish the expected target from an observed call/result or other authoritative evidence, then mark the chosen PR as depending on any shared changes? Also, the Windows lookup issue from my inline comment remains.
Dextroid17 commented 2026-10-12 20:24:35 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-12T20:24:35Z.


Linux build, the one line that is missing, and the value the function actually returns

I built this head on Linux. It does not compile. One line fixes that, and then the function works and exports the NID you computed — but what it returns differs from the reference it cites, and its two platforms return different quantities. I have no PR against this path and nothing here is a request for a change I have not measured.

Head 0eb817ae1b, base/merge-base 2a5eca11c, upstream/main 1acfa7f78.

1. The build fails

FAILED: core/libs/prx/libkernel/CMakeFiles/libkernel.dir/Module/src/Module.cpp.o
core/libs/prx/libkernel/Module/src/Module.cpp:280:5: error: ‘Dl_info’ was not declared in this scope
  280 |     Dl_info info{};
core/libs/prx/libkernel/Module/src/Module.cpp:281:9: error: ‘dladdr’ was not declared in this scope
core/libs/prx/libkernel/Module/src/Module.cpp:289:42: error: ‘info’ was not declared in this scope
ninja: build stopped: subcommand failed.

The include guard at core/libs/prx/libkernel/Module/src/Module.cpp:13-23 is #ifdef _WIN32 / #elif defined(__APPLE__) / #else, and <dlfcn.h> sits in the Apple arm. That is correct for main: the file's only other Dl_info/dladdr use (:155-156) is inside the __APPLE__ block that opens at :123 and closes at :168. The new Linux code at :281 and :289 is in the #else arm, where nothing declares them.

Four other files in the tree include it for their Linux branch — core/libs/prx/libkernel/Module/src/DynamicLoader.cpp:18-20 (same directory), core/libs/prx/libSceLibcInternal/Export.cpp:11-13, core/libs/prx/libc/src/exception/Unwind.cpp:6-7, core/libs/prx/libSceAgcDriver/Execution/src/ThreadPriority.cpp:14-16 — so the pattern is right there.

2. What the fix is, and what it is not (my arm, not yours)

Adding only <dlfcn.h> to the #else branch:

[2/3] Linking CXX shared library core/libs/libs/unpatched/libkernel.prx     -> exit 0
nm -D --defined-only …/unpatched/libkernel.prx | grep LibkernelTextLocation
0000000000098700 T sceKernelGetLibkernelTextLocation_nid_postfix

Adding <link.h> as well does not work, and it is the obvious next guess: it collides with the project's own header, which defines those types for platforms that lack them —

/usr/include/elf.h:707:3: error: conflicting declaration ‘typedef struct Elf64_Phdr Elf64_Phdr’
/home/…/prx/libc/include/specifics/linux/ElfTypes.hpp:7:8: note: previous declaration as ‘struct Elf64_Phdr’
/usr/include/link.h:155:8: error: redefinition of ‘struct dl_phdr_info’
/home/…/prx/libc/include/specifics/linux/ElfTypes.hpp:18:8: note: previous definition of ‘struct dl_phdr_info’

Worth knowing why the second "Tested" item passed: tools/nid_names.py decides already-implemented from compute_nid(suggestion) == nid plus the name appearing in collect_real_names(), which scans source definitions (tools/nid_names.py:105-113). It reads the added line and cannot see that the file does not compile. compute_nid("sceKernelGetLibkernelTextLocation") is AmJ0mn2l4lM, so the NID half of your claim holds.

3. What it returns, measured

With the include added, driving the built module (probe linked against unpatched/libkernel.prx):

sceKernelGetLibkernelTextLocation(&addr,&size) -> 0
  address = 0x7fc0a45cf000
  size    = 0x9da79  (645753 bytes)

the application's own segment 0:
  address = 0x555e6d8ac000
  size    = 0x381  (897 bytes)

the symbol lives in .../unpatched/libkernel.prx
  dladdr base = 0x7fc0a45b4000

null checks: (nullptr,&size) -> -2147352562 ; (&addr,nullptr) -> -2147352562   (= 0x8002000E = SCE_KERNEL_ERROR_EFAULT)

So on Linux it returns the native libkernel.prx's own executable segment at its host mapping. That is a different quantity from the reference this PR cites. fpPS4's body (pinned 04cefd43e6, kernel/ps4_libkernel.pas:330-340) is

function ps4_sceKernelGetLibkernelTextLocation(address:PPointer;size:PQWORD):Integer;
var elf:Telf_file;
begin
 Result:=0;
 elf:=Telf_file(ps4_program.ps4_app.prog);
 if (elf=nil) then Exit(-1);
 address^:=elf.ModuleInfo.segmentInfo[0].address;
 size   ^:=elf.ModuleInfo.segmentInfo[0].size;
end;

— the application's segment 0, with a nil guard returning -1, not EFAULT. And the function this one exists to serve, sceKernelInternalMemoryGetModuleSegmentInfo, is still a throwing stub on this base (core/libs/prx/libkernel/Module/src/Module.cpp:245, // unknown signature), so nothing in-tree reaches the new export; open PR #4193 implements it, and its body says it "returns the first segment reported by sceKernelGetModuleInfo for the main program", explicitly recording that the console "may instead report libkernel's text" as unverified. If both land, a title gets the app's first segment from the segment-info call and libkernel's text from this one.

The Windows arm returns yet a third thing. Every guest library is built PREFIX "" / SUFFIX .prx (core/libs/CMakeLists.txt:127-134, and :72-74 for libc), so the module on disk is libkernel.prx, and GetModuleHandleW(L"libkernel.dll") (core/libs/prx/libkernel/Module/src/Module.cpp:256) cannot match it — the lookup fails and the code takes the fallback to the main module, returning the title's image base and SizeOfImage. The two arms of one function therefore disagree, silently. Whichever meaning is intended, it is worth saying in the debt entry; the probe above is reproducible if you want the numbers on your side.

4. The named title

The bar here is a title ID and the log line where that title stops, and this PR has neither: #4560's evidence is hypothetical ("Any title, homebrew port, or loader that queries this symbol directly fails"), and AmJ0mn2l4lM appears in none of the five title trees I hold — searched with a positive control, since the same search does find -YTW+qXc3CQ in PPSA02929-app0/sce_module/libc.prx. If you have a title that imports AmJ0mn2l4lM, its log line is the thing that would carry this; sceKernelInternalMemoryGetModuleSegmentInfo's 44-title importer list (named in #4193) is a different symbol.

5. Nothing exercises it

One file changed, no test, and the body's own Tested section says no build was run. A behavioural case would have caught the compile break and the cross-platform difference at once — guest_module_info_tests is the neighbouring target, and #4193 shipped a test with the same shape.

6. Merge state

Merges cleanly with upstream/main (git merge-tree --write-tree pr-4675 upstream/main exits 0). It conflicts with open #4193 in core/libs/prx/libkernel/Module/src/Module.cpp (merge-tree exits 1) — the overlap bot lists this one already, and since #4193 is the consumer this helper was written for, the two authors probably want to agree on the meaning above before either lands.

What I could not check: anything on Windows (the arm is not compiled by CI for a pull request, so neither a compile nor the GetModuleHandleW fallback is covered there), and what the console's own value is — fpPS4's body and its segmentInfo[0] naming disagree with each other, and no title run here reaches the call.

AI-assisted review; every number above comes from a command run here.

Hermes Agent 🤖 at your service

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132007822 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#issuecomment-6132007822). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-12T20:24:35Z. --- **Linux build, the one line that is missing, and the value the function actually returns** I built this head on Linux. **It does not compile.** One line fixes that, and then the function works and exports the NID you computed — but what it returns differs from the reference it cites, and its two platforms return different quantities. I have no PR against this path and nothing here is a request for a change I have not measured. Head `0eb817ae1b`, base/merge-base `2a5eca11c`, `upstream/main` `1acfa7f78`. **1. The build fails** ``` FAILED: core/libs/prx/libkernel/CMakeFiles/libkernel.dir/Module/src/Module.cpp.o core/libs/prx/libkernel/Module/src/Module.cpp:280:5: error: ‘Dl_info’ was not declared in this scope 280 | Dl_info info{}; core/libs/prx/libkernel/Module/src/Module.cpp:281:9: error: ‘dladdr’ was not declared in this scope core/libs/prx/libkernel/Module/src/Module.cpp:289:42: error: ‘info’ was not declared in this scope ninja: build stopped: subcommand failed. ``` The include guard at `core/libs/prx/libkernel/Module/src/Module.cpp:13-23` is `#ifdef _WIN32` / `#elif defined(__APPLE__)` / `#else`, and `<dlfcn.h>` sits in the **Apple** arm. That is correct for main: the file's only other `Dl_info`/`dladdr` use (`:155-156`) is inside the `__APPLE__` block that opens at `:123` and closes at `:168`. The new Linux code at `:281` and `:289` is in the `#else` arm, where nothing declares them. Four other files in the tree include it for their Linux branch — `core/libs/prx/libkernel/Module/src/DynamicLoader.cpp:18-20` (same directory), `core/libs/prx/libSceLibcInternal/Export.cpp:11-13`, `core/libs/prx/libc/src/exception/Unwind.cpp:6-7`, `core/libs/prx/libSceAgcDriver/Execution/src/ThreadPriority.cpp:14-16` — so the pattern is right there. **2. What the fix is, and what it is not** (my arm, not yours) Adding **only** `<dlfcn.h>` to the `#else` branch: ``` [2/3] Linking CXX shared library core/libs/libs/unpatched/libkernel.prx -> exit 0 nm -D --defined-only …/unpatched/libkernel.prx | grep LibkernelTextLocation 0000000000098700 T sceKernelGetLibkernelTextLocation_nid_postfix ``` Adding `<link.h>` as well does **not** work, and it is the obvious next guess: it collides with the project's own header, which defines those types for platforms that lack them — ``` /usr/include/elf.h:707:3: error: conflicting declaration ‘typedef struct Elf64_Phdr Elf64_Phdr’ /home/…/prx/libc/include/specifics/linux/ElfTypes.hpp:7:8: note: previous declaration as ‘struct Elf64_Phdr’ /usr/include/link.h:155:8: error: redefinition of ‘struct dl_phdr_info’ /home/…/prx/libc/include/specifics/linux/ElfTypes.hpp:18:8: note: previous definition of ‘struct dl_phdr_info’ ``` Worth knowing why the second "Tested" item passed: `tools/nid_names.py` decides `already-implemented` from `compute_nid(suggestion) == nid` plus the name appearing in `collect_real_names()`, which scans **source definitions** (`tools/nid_names.py:105-113`). It reads the added line and cannot see that the file does not compile. `compute_nid("sceKernelGetLibkernelTextLocation")` is `AmJ0mn2l4lM`, so the NID half of your claim holds. **3. What it returns, measured** With the include added, driving the built module (probe linked against `unpatched/libkernel.prx`): ``` sceKernelGetLibkernelTextLocation(&addr,&size) -> 0 address = 0x7fc0a45cf000 size = 0x9da79 (645753 bytes) the application's own segment 0: address = 0x555e6d8ac000 size = 0x381 (897 bytes) the symbol lives in .../unpatched/libkernel.prx dladdr base = 0x7fc0a45b4000 null checks: (nullptr,&size) -> -2147352562 ; (&addr,nullptr) -> -2147352562 (= 0x8002000E = SCE_KERNEL_ERROR_EFAULT) ``` So on Linux it returns the native `libkernel.prx`'s own executable segment at its host mapping. That is a different quantity from the reference this PR cites. fpPS4's body (pinned `04cefd43e6`, `kernel/ps4_libkernel.pas:330-340`) is ```pascal function ps4_sceKernelGetLibkernelTextLocation(address:PPointer;size:PQWORD):Integer; var elf:Telf_file; begin Result:=0; elf:=Telf_file(ps4_program.ps4_app.prog); if (elf=nil) then Exit(-1); address^:=elf.ModuleInfo.segmentInfo[0].address; size ^:=elf.ModuleInfo.segmentInfo[0].size; end; ``` — the **application's** segment 0, with a nil guard returning **-1**, not `EFAULT`. And the function this one exists to serve, `sceKernelInternalMemoryGetModuleSegmentInfo`, is still a throwing stub on this base (`core/libs/prx/libkernel/Module/src/Module.cpp:245`, `// unknown signature`), so nothing in-tree reaches the new export; open PR #4193 implements it, and its body says it "returns the first segment reported by `sceKernelGetModuleInfo` for the main program", explicitly recording that the console "may instead report libkernel's text" as unverified. If both land, a title gets the app's first segment from the segment-info call and libkernel's text from this one. The Windows arm returns yet a third thing. Every guest library is built `PREFIX ""` / `SUFFIX .prx` (`core/libs/CMakeLists.txt:127-134`, and `:72-74` for libc), so the module on disk is `libkernel.prx`, and `GetModuleHandleW(L"libkernel.dll")` (`core/libs/prx/libkernel/Module/src/Module.cpp:256`) cannot match it — the lookup fails and the code takes the fallback to the main module, returning the **title's** image base and `SizeOfImage`. The two arms of one function therefore disagree, silently. Whichever meaning is intended, it is worth saying in the debt entry; the probe above is reproducible if you want the numbers on your side. **4. The named title** The bar here is a title ID and the log line where that title stops, and this PR has neither: #4560's evidence is hypothetical ("Any title, homebrew port, or loader that queries this symbol directly fails"), and `AmJ0mn2l4lM` appears in **none** of the five title trees I hold — searched with a positive control, since the same search does find `-YTW+qXc3CQ` in `PPSA02929-app0/sce_module/libc.prx`. If you have a title that imports `AmJ0mn2l4lM`, its log line is the thing that would carry this; `sceKernelInternalMemoryGetModuleSegmentInfo`'s 44-title importer list (named in #4193) is a different symbol. **5. Nothing exercises it** One file changed, no test, and the body's own Tested section says no build was run. A behavioural case would have caught the compile break and the cross-platform difference at once — `guest_module_info_tests` is the neighbouring target, and #4193 shipped a test with the same shape. **6. Merge state** Merges cleanly with `upstream/main` (`git merge-tree --write-tree pr-4675 upstream/main` exits 0). It **conflicts** with open #4193 in `core/libs/prx/libkernel/Module/src/Module.cpp` (`merge-tree` exits 1) — the overlap bot lists this one already, and since #4193 is the consumer this helper was written for, the two authors probably want to agree on the meaning above before either lands. **What I could not check:** anything on Windows (the arm is not compiled by CI for a pull request, so neither a compile nor the `GetModuleHandleW` fallback is covered there), and what the console's own value is — fpPS4's body and its `segmentInfo[0]` naming disagree with each other, and no title run here reaches the call. AI-assisted review; every number above comes from a command run here. Hermes Agent 🤖 at your service
MarcZX10 commented 2026-10-12 20:31:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-12T20:31:42Z.


Thanks for the independent Linux build and the detailed reference comparison. This confirms the missing dlfcn.h include and adds an important semantic ambiguity: Linux reports the title image fallback, while the intended export target is still unverified. My review already asks the author to reconcile this with #4567 and establish the expected console result; I agree the PR should remain blocked on both target semantics and the Windows module lookup rather than taking only the compile fix.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132110930 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#issuecomment-6132110930). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-12T20:31:42Z. --- Thanks for the independent Linux build and the detailed reference comparison. This confirms the missing `dlfcn.h` include and adds an important semantic ambiguity: Linux reports the title image fallback, while the intended export target is still unverified. My review already asks the author to reconcile this with #4567 and establish the expected console result; I agree the PR should remain blocked on both target semantics and the Windows module lookup rather than taking only the compile fix.
github-actions[bot] commented 2026-10-12 21:10:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T21:10:56Z.


Progress report (9f7c40e → 0eb817a)

📈 System libraries: 86.37% (+0.01%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel sceKernelGetLibkernelTextLocation_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132672642 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#issuecomment-6132672642). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-12T21:10:56Z. --- <!-- progress-report --> ### Progress report (9f7c40e → 0eb817a) 📈 **System libraries**: 86.37% (+0.01%, +1 implemented functions) <details> <summary>✅ 1 implemented</summary> | Library | Name | | - | - | | libkernel | `sceKernelGetLibkernelTextLocation_nid_postfix` | </details>
adriadam10 commented 2026-10-12 21:11:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:11:54Z.


Closing: this export was merged in #4567, so this PR duplicates it and can't be merged next to it.

Besides that:

  • core/libs/prx/libkernel/Module/src/Module.cpp:280 does not compile on Linux: Dl_info/dladdr need <dlfcn.h>, which is only included in the __APPLE__ arm (confirmed by @Dextroid17's build).
  • The Windows and Linux paths return different things (whole image size vs the first executable segment), and neither is checked against an observed result.
  • No test and no local build ("No build/tests were run").

Feel free to reopen if there is a gap left on top of #4567, with a build that passes and a test that fails without the change.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132685717 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/4675#issuecomment-6132685717). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-12T21:11:54Z. --- Closing: this export was merged in #4567, so this PR duplicates it and can't be merged next to it. Besides that: - `core/libs/prx/libkernel/Module/src/Module.cpp:280` does not compile on Linux: `Dl_info`/`dladdr` need `<dlfcn.h>`, which is only included in the `__APPLE__` arm (confirmed by @Dextroid17's build). - The Windows and Linux paths return different things (whole image size vs the first executable segment), and neither is checked against an observed result. - No test and no local build ("No build/tests were run"). Feel free to reopen if there is a gap left on top of #4567, with a build that passes and a test that fails without the change.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
boykopovar/AnyPS5!4675
No description provided.