Repository navigation
Home
-
Oct 23, 2015
- MachOTool should be usable now. Its features should be comparable to the most commonly used features in otool, nm, dyldinfo. But more feature will be coming soon.
- It should handle most Mac OS X and iOS binaries correctly.
- Feel free to give it a try! If it cannot handle your binaries, it would be great if you send me a copy of the binary.
- No relocation / binding information parsing yet. [iOS, MacOS]
- Erratic column resizing behavior in some tables. [UI]
- Scrolling beyond the top or bottom of tables results in some flickering. [UI]
- Parsing of relocation / binding information and correlation with symbols.
- More CLI commands for finer control of displaying various information.
- Progress indicator in GUI mode when parsing / filtering.
- Need more unit tests various types of binaries. (E.g. libraries)
There are already a variety of tools / libraries that have very similar functionalities. So, why yet another tool? First, I like to create a tool that is cross-platform. macholib is quite close to what I want. But I like to have deeper parsing, structural validation and presentation of all fields and a GUI tool.
The idea of MachOTool came to me during one of my previous jobs that involved some very low-level system programming on iOS. Suppose I want the answer to the following question: "What new system call is made in sqlite3_open() in iOS 7 that is not made in iOS 6?" With a combination of stepping code in lldb, and reading lots ARM assembly, I figured out the answer. (I do not have the comprehensive list. But one of them is dlsym().)
The symbol table has an external symbol of _dlsym. There are binding opcodes for that symbol reference. There should even be some rebase information for the stub function. If I can only correlate these different pieces of information and presents in a user-centric way, this question can quickly be answered.
There were a few occasion where I wanted to look at specific structure / header on non-functional iOS executable / object files. The available tools provide various hex dump but never present information in a user friendly way.
That is the motivation. It may not be the best reason to write yet another Mach-O tool. But I love to develop software and I don't need a good reason to write more code.