feat(libkernel): export execv #3544

Merged
babyhuey merged 1 commit from upstream-pr/3544 into main 2026-10-11 21:33:08 +00:00
babyhuey commented 2026-10-11 12:56:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-11T12:56:31Z.


What

Exports execv (KaK52lYTBIs) from libkernel next to execvp, and like it, it throws (NotImplemented, "execv: executable replacement"): replacing the process image is not supported. TechnicalDebt lists it next to execvp. There is no test, as for the other exports that only throw.

XPSemu (PPSA97358) imports it from the same module as execvp and stops at it on main a11c8f7f (catalog build, eboot.bin and sce_module/libc.prx unwrapped as #2605 requires; tracked in #1578):

  • Linux: app.elf: symbol lookup error: app.elf: undefined symbol: KaK52lYTBIs
  • Windows: FAIL: unresolved ELF import KaK52lYTBIs (execv) from libkernel.prx
  • with this PR, Linux: app.elf: symbol lookup error: app.elf: undefined symbol: mrbHXqK8wkg (sigwait)
  • with this PR, Windows: FAIL: unresolved ELF import mrbHXqK8wkg (sigwait) from libkernel.prx

Dusklight (PPSA99305, 0.1.1, new in the catalog) stops at it too:

  • Linux: app.elf: symbol lookup error: app.elf: undefined symbol: KaK52lYTBIs
  • Windows: FAIL: unresolved ELF import KaK52lYTBIs (execv) from libkernel.prx
  • with this PR, Linux: app.elf: symbol lookup error: app.elf: undefined symbol: owKuegZU4ew (logb, in #3598)
  • with this PR, Windows: FAIL: unresolved ELF import owKuegZU4ew (logb) from libSceLibcInternal.prx

Tested

Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release: libkernel builds with no warnings in Process.cpp, and the XPSemu and Dusklight lines above. check_conventions.py passes.

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 (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4819207662 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3544). Originally posted by [babyhuey](https://github.com/babyhuey) on 2026-10-11T12:56:31Z. --- ### What Exports `execv` (`KaK52lYTBIs`) from libkernel next to `execvp`, and like it, it throws (`NotImplemented`, "execv: executable replacement"): replacing the process image is not supported. TechnicalDebt lists it next to `execvp`. There is no test, as for the other exports that only throw. XPSemu (PPSA97358) imports it from the same module as `execvp` and stops at it on `main` a11c8f7f (catalog build, `eboot.bin` and `sce_module/libc.prx` unwrapped as #2605 requires; tracked in #1578): - Linux: `app.elf: symbol lookup error: app.elf: undefined symbol: KaK52lYTBIs` - Windows: `FAIL: unresolved ELF import KaK52lYTBIs (execv) from libkernel.prx` - with this PR, Linux: `app.elf: symbol lookup error: app.elf: undefined symbol: mrbHXqK8wkg` (`sigwait`) - with this PR, Windows: `FAIL: unresolved ELF import mrbHXqK8wkg (sigwait) from libkernel.prx` Dusklight (PPSA99305, 0.1.1, new in the catalog) stops at it too: - Linux: `app.elf: symbol lookup error: app.elf: undefined symbol: KaK52lYTBIs` - Windows: `FAIL: unresolved ELF import KaK52lYTBIs (execv) from libkernel.prx` - with this PR, Linux: `app.elf: symbol lookup error: app.elf: undefined symbol: owKuegZU4ew` (`logb`, in #3598) - with this PR, Windows: `FAIL: unresolved ELF import owKuegZU4ew (logb) from libSceLibcInternal.prx` ### Tested Linux (Ubuntu 24.04, GCC 13) and Windows 11 (MinGW-w64 GCC 15.2 from WinLibs), Release: libkernel builds with no warnings in `Process.cpp`, and the XPSemu and Dusklight lines above. `check_conventions.py` passes. ### 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 (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] AI-assisted: yes
github-actions[bot] commented 2026-10-11 12:56:52 +00:00 (Migrated from github.com)

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


Progress report (a11c8f7 → 0e9a8dd)

📉 System libraries: 85.79% (-0.02%, +1 declared functions)

🆕 1 declared as stubs
Library Name
libkernel execv_nid_postfix
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109255536 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3544#issuecomment-6109255536). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T12:56:52Z. --- <!-- progress-report --> ### Progress report (a11c8f7 → 0e9a8dd) 📉 **System libraries**: 85.79% (-0.02%, +1 declared functions) <details> <summary>🆕 1 declared as stubs</summary> | Library | Name | | - | - | | libkernel | `execv_nid_postfix` | </details>
github-actions[bot] commented 2026-10-11 17:28:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T17:28:09Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#3765 docs/dev/TechnicalDebt.md L416
#3779 docs/dev/TechnicalDebt.md L416
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111704781 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3544#issuecomment-6111704781). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-11T17:28:09Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #3765 | `docs/dev/TechnicalDebt.md` [L416](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/docs/dev/TechnicalDebt.md#L416) | | | | #3779 | `docs/dev/TechnicalDebt.md` [L416](https://github.com/boykopovar/AnyPS5/blob/1770f352d7546c1eae9cf1e1441e1ae2428dc3a0/docs/dev/TechnicalDebt.md#L416) | | |
adriadam10 commented 2026-10-11 21:33:04 +00:00 (Migrated from github.com)

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


Checked: execv (KaK52lYTBIs) matches the NID name, mirrors execvp (throws NotImplemented), TechnicalDebt line is in place; libkernel build and ctest (93 tests) pass on Linux. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114013981 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/3544#issuecomment-6114013981). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-11T21:33:04Z. --- Checked: `execv` (`KaK52lYTBIs`) matches the NID name, mirrors `execvp` (throws `NotImplemented`), TechnicalDebt line is in place; libkernel build and ctest (93 tests) pass on Linux. Merging.
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!3544
No description provided.