mirror of
https://codeberg.org/dabao1955/apk-reverse.git
synced 2026-11-28 03:50:22 +08:00
native-and-so.md taught how to find and hook JNI calls in a stripped library but never said what the listing itself means: registers were named only incidentally (pitfalls P43 assumes "the AArch64 argument registers" as known), the frame pattern appeared in examples without explanation, and the addressing shapes were nowhere. The source notes' ARM64 essentials 00-02 are exactly that missing layer, and the original scoping pass had filed the whole series under "language teaching" after reading only its debugging chapter -- same silent-truncation failure mode the article audit already caught twice. New section "Reading AArch64 -- registers, addressing, frames", placed after the call-site recipe it underlies: the register role/saved-by table with the Wn- zeroes-the-high-half truncation trap, the AAPCS64 argument rules including the separate floating-point channel and the JNI consequence (env X0, thiz X1, user args X2 -- the reason the vtable shape above loads from X0), the canonical prologue/epilogue with the X29 chain identified as what every backtrace walks, the six addressing shapes on sight (including SXTW-vs-UXTW and the adrp+add PIC pattern the source notes omit but every string xref wears), movz/movk immediates with the byte-patching consequence, and the mov-x8-plus-svc syscall shape tied back to what svc_scan.py actually locates -- including the data-not-code reading of an svc hit with no X8 load nearby. 03 (GCC inline-asm syntax) and 05-07 (ROP, shellcode, overflow exploitation) stay out by design: development and exploitation material, not lookup value for reading a library during a reversing task. Provenance and strength labels at the point of use, retrieval date included. Gates re-run: routing coherent, 409 section references zero dangling, repo clean, pytest 751 passed / 194 skipped / 25 xfailed.