PEBIL: Efficient Static Binary Instrumentation for Linux
Michael A. Laurenzano, Mustafa M. Tikir, et al.
Proceedings of the ISPASS, 2010.
PEBIL is a static instrumentation toolkit that relocates entire functions to ensure space for 5-byte branch instructions at any point. While it supports instruction-level modification, it primarily targets 'Basic Blocks' as a strategic trade-off to minimize code expansion and maximize efficiency through lightweight assembly snippets and inlining.
In my view
PEBIL enables instruction-level modification by relocating entire functions; however, this aggressive relocation makes it more suitable for static instrumentation rather than dynamic interception
Limitations
Complexity in Resolving Indirect Branch Targets Static analysis struggles to determine the destination of indirect branches without runtime information.
Disruption of Compiler Optimizations Relocating and expanding code destroys original alignment and size optimizations made by the compiler
Challenges in Code and Data Discovery To distinguish code from intertwined data (like jump tables), PEBIL employs a sophisticated two-phase approach: Control-driven disassembly and Linear Disassembly, but 1% of the code remains unresolvable.