Skip to content

docs(dev): guide to reading call sites and library disassembly - #9021

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
adriadam10:docs/reverse-engineering-guide
Oct 21, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
adriadam10:docs/reverse-engineering-guide

Conversation

@adriadam10

Copy link
Copy Markdown
Collaborator

What

Adds docs/dev/REVERSE_ENGINEERING.md and links it from CONTRIBUTING. About 11 debt files already cite a title's call sites and 15 cite disassembly (libSceAgc, libSceAudioIn, libSceNpTrophy2, libSceRtc, libSceHttp, libSceJobManager...), but nothing says how to find them, what they establish or how to cite them. The page covers:

  • the order of sources (console measurement, the library's own code, other implementations, call sites);
  • what a call site settles (argument count and widths, buffers, in/out arguments, checked results, log strings, size queries) and what it doesn't (what the library returns or writes: those paths still throw, and a read that reports no data is not a UI-only silent stub);
  • finding call sites with relinker --registry (callSites, GLOB_DAT vs JUMP_SLOT) and disassembling the section-less ELF with objdump;
  • how to cite it in the PR and the debt entry;
  • rules: only dumps you own, no game/firmware files or keys anywhere, implement from the contract instead of translating the disassembly, interoperability only.

Based on

The technique and the examples come from these merged pull requests:

Tested

Followed the steps on Astro's Playroom's eboot.bin: unwrap_self, readelf/objdump of the executable LOAD segment, PLT stub 0x1f2e480 and its 4 callers; the registry fields checked against relinker registries of three titles (GLOB_DAT sites are the calls, JUMP_SLOT sites are the PLT stubs). tools/nid_names.py --name sceVoiceQoSReadPacket gives PWokFqab5q4. tools/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 under Silent stubs in their library's technical debt file
  • 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
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Co-Authored-By: Claude <noreply@anthropic.com>
@adriadam10
adriadam10 merged commit e05da53 into boykopovar:main Oct 21, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant