m4b / bingrep

like ~~grep~~ UBER, but for binaries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mach: better load command info

m4b opened this issue · comments

commented

Load commands could use some love when it comes to printing their content.

Should be very straighforward, e.g. this is output currently:

   0 LC_SEGMENT_64
   1 LC_SEGMENT_64
   2 LC_SEGMENT_64
   3 LC_ID_DYLIB
   4 LC_DYLD_INFO_ONLY
   5 LC_SYMTAB
   6 LC_DYSYMTAB
   7 LC_UUID
   8 LC_VERSION_MIN_MACOSX
   9 LC_SOURCE_VERSION
  10 LC_SEGMENT_SPLIT_INFO
  11 LC_LOAD_DYLIB
  12 LC_LOAD_DYLIB
  13 LC_LOAD_DYLIB
  14 LC_LOAD_DYLIB
  15 LC_LOAD_DYLIB
  16 LC_LOAD_DYLIB
  17 LC_LOAD_DYLIB
  18 LC_LOAD_UPWARD_DYLIB
  19 LC_LOAD_UPWARD_DYLIB
  20 LC_LOAD_UPWARD_DYLIB
  21 LC_LOAD_UPWARD_DYLIB
  22 LC_LOAD_UPWARD_DYLIB
  23 LC_LOAD_UPWARD_DYLIB
  24 LC_LOAD_UPWARD_DYLIB
  25 LC_LOAD_UPWARD_DYLIB
  26 LC_SUB_FRAMEWORK
  27 LC_FUNCTION_STARTS
  28 LC_DATA_IN_CODE
  29 LC_DYLIB_CODE_SIGN_DRS
  30 LC_CODE_SIGNATURE

Would be nice to either summarize the important data in the load command (the version, the uuid, etc.) or just fully print the values of each (more noisy).

I'll pretty much merge anything that does this in a reasonable manner