项目作者: cxcorp

项目描述 :
A work-in-progress learning project about Mach-O.
高级语言: C
项目地址: git://github.com/cxcorp/mach-o-inspector.git
创建时间: 2018-06-13T21:04:09Z
项目社区:https://github.com/cxcorp/mach-o-inspector

开源协议:

下载


mach-o inspector

A work-in-progress learning project with the goal of learning about the Mach-O format and brushing up on C. Tested on MacOS 10.13.4.

Status

The program currently dumps /bin/mv‘s segments and sections.

  1. $ ./inspector
  2. magic: feedfacf
  3. cpu specifier: CPU_TYPE_X86_64
  4. machine specifier: 80000003
  5. type of file: MH_EXECUTE
  6. number of load commands: 00000010
  7. the size of all the load commands: 00000600
  8. flags: 00200085
  9. reserved: 00000000
  10. [0] 0x0 (72 bytes): LC_SEGMENT_64 (0x19), 64-bit segment of this file to be mapped
  11. __PAGEZERO, 0 sections
  12. [1] 0x48 (552 bytes): LC_SEGMENT_64 (0x19), 64-bit segment of this file to be mapped
  13. __TEXT, 6 sections
  14. __text
  15. __stubs
  16. __stub_helper
  17. __const
  18. __cstring
  19. __unwind_info
  20. [2] 0x270 (472 bytes): LC_SEGMENT_64 (0x19), 64-bit segment of this file to be mapped
  21. __DATA, 5 sections
  22. __nl_symbol_ptr
  23. __got
  24. __la_symbol_ptr
  25. __bss
  26. __common
  27. [3] 0x448 (72 bytes): LC_SEGMENT_64 (0x19), 64-bit segment of this file to be mapped
  28. __LINKEDIT, 0 sections
  29. [4] 0x490 (48 bytes): LC_DYLD_INFO_ONLY (0x80000022), compressed dyld information only
  30. [5] 0x4C0 (24 bytes): LC_SYMTAB (0x2), link-edit stab symbol table info
  31. [6] 0x4D8 (80 bytes): LC_DYSYMTAB (0xB), dynamic link-edit symbol table info
  32. [7] 0x528 (32 bytes): LC_LOAD_DYLINKER (0xE), load a dynamic linker
  33. [8] 0x548 (24 bytes): LC_UUID (0x1B), the uuid
  34. [9] 0x560 (16 bytes): LC_VERSION_MIN_MACOSX (0x24), build for MacOSX min OS version
  35. [10] 0x570 (16 bytes): LC_SOURCE_VERSION (0x2A), source version used to build binary
  36. [11] 0x580 (24 bytes): LC_MAIN (0x80000028), replacement for LC_UNIXTHREAD
  37. [12] 0x598 (56 bytes): LC_LOAD_DYLIB (0xC), load a dynamically linked shared library
  38. [13] 0x5D0 (16 bytes): LC_FUNCTION_STARTS (0x26), compressed table of function start addresses
  39. [14] 0x5E0 (16 bytes): LC_DATA_IN_CODE (0x29), table of non-instructions in __text
  40. [15] 0x5F0 (16 bytes): LC_CODE_SIGNATURE (0x1D), local of code signature