Skip to main content

Module analysis

Module analysis 

Source
Expand description

What joins the loader, the type library and the control-flow recovery: an image’s seeds, what is known about its imports, the decoder for its machine, and the names of its addresses; computed jumps and calls resolved through the pointer slots they load or their tables (resolve).

Modules§

resolve
Where computed jumps and calls go, for control-flow recovery: the function’s code so far lifted to L1, constants and stack slots found; then the pointer slot the address is loaded from, or the jump’s table read from the image (binbun_ssa::jump). The same for x86-64 and AArch64: only the sweep for the addresses code computes, which cuts tables bounded by their index’s width, decodes each architecture’s instructions.

Structs§

ImageCallees
What the type library says about whether an image’s imports (by slot) and its named functions (by address: a symbol identifies a function as much as an import’s name does) return, and which pointer slots hold a fixed code address once the image is loaded.
Seeds
Which of an image’s facts recovery starts from.
UnsupportedMachine
Why an image cannot be analysed.

Functions§

analyse
Recovers image’s control flow from seeds, asking library about the functions it calls.
analyse_corrected
analyse with the user’s corrections as seeds and constraints (Corrections::seeds); with none, the same program.
names
Names of addresses, from symbols and imports.
seeds
Where recovery starts.
type_library
The type library for image: the built-in facts and the databases (embedded, then those in the database directory) for its architecture and operating system, and for kernel-mode code where it is a Windows driver (Image::kernel: the kernel’s exports, not Win32’s). An ELF file is taken to be for Linux (its OS ABI field is almost always 0, which says nothing), a PE file for Windows, a Mach-O file for macOS.
x86_mode
The x86 mode of machine.