First, instantiate a Mach
object, passing it the path to a mach-o binary:
m = Mach("/usr/lib/libobjc.A.dylib")
The Mach
class treats all mach-o binaries as if they're fat binaries with at least once slice. So to work with your mach-o you first have to get its slice, even if it's not a fat binary. You can either to this by architecture name or slice index: