qyang-nj / llios

Random stuff about lower level iOS
318 stars 33 forks source link

[MachO Parser] Parse __llvm_covfun #90

Closed qyang-nj closed 1 year ago

qyang-nj commented 1 year ago

Parse __LLVM_COV,__llvm_covfun section.

LC_SEGMENT_64        cmdsize: 1512   segname:                file: 0x00000728-0x00000eb8 1.89KB     vm: 0x000000000-0x000000790 1.89KB    prot: 7/7
   9: 0x000000b40-0x000000c05 197B        (__LLVM_COV,__llvm_covfun)        type: S_REGULAR  offset: 2880
0: FuncNameHash: 0x7a98ea6a153a94e6, DataLen: 50, FuncHash: 0x0, FileNameHash: 0xb56f2617839bb79c
    FileIDMapping: (NFiles: 1)
      0: 0
    MappingRegions: (NRegionArrays: 1)
      0: (NRegions: 8)
         0: 2:39 => 10:6 : 0
         1: 3:12 => 3:28 : 0
         2: 3:29 => 5:10 : 1
         3: 5:10 => 10:6 : (0 - 1)
         4: 5:19 => 5:35 : (0 - 1)
         5: 5:36 => 7:10 : 2
         6: 7:10 => 10:6 : ((0 - 1) - 2)
         7: 7:16 => 9:10 : ((0 - 1) - 2)