MCPcopy Index your code
hub / github.com/qilingframework/qiling / parseData

Method parseData

qiling/loader/macho_parser/parser.py:115–143  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

113
114
115 def parseData(self):
116 self.segments = []
117 self.sections = [None]
118 for command in self.commands:
119 if command.cmd_id == LC_SEGMENT_64:
120 tmp = Segment(command, self.binary_file)
121 tmp.sections_index += range(len(self.sections), len(self.sections) + len(tmp.sections))
122 self.segments.append(tmp)
123 for section in tmp.sections:
124 self.sections.append(section)
125 elif command.cmd_id == LC_SEGMENT:
126 tmp = Segment(command, self.binary_file)
127 self.segments.append(tmp)
128 for section in tmp.sections:
129 self.sections.append(section)
130 elif command.cmd_id == LC_FUNCTION_STARTS:
131 self.function_starts = FunctionStarts(command, self.binary_file)
132 elif command.cmd_id == LC_SYMTAB:
133 self.symbol_table = SymbolTable(command, self.binary_file)
134 self.string_table = StringTable(command, self.binary_file)
135 elif command.cmd_id == LC_DATA_IN_CODE:
136 self.data_in_code = DataInCode(command, self.binary_file)
137 elif command.cmd_id == LC_CODE_SIGNATURE:
138 self.code_signature = CodeSignature(command, self.binary_file)
139 elif command.cmd_id == LC_SEGMENT_SPLIT_INFO:
140 self.seg_split_info = SegmentSplitInfo(command, self.binary_file)
141 elif command.cmd_id == LC_DYSYMTAB:
142 self.dysymbol_table = DySymbolTable(command, self.binary_file)
143 return True
144
145 @staticmethod
146 def getMagic(binary):

Callers 1

parseFileMethod · 0.95

Calls 9

SegmentClass · 0.85
FunctionStartsClass · 0.85
SymbolTableClass · 0.85
StringTableClass · 0.85
DataInCodeClass · 0.85
CodeSignatureClass · 0.85
SegmentSplitInfoClass · 0.85
DySymbolTableClass · 0.85
appendMethod · 0.45

Tested by

no test coverage detected