Lines Matching refs:seg_cmd
1358 llvm::MachO::segment_command_64 &seg_cmd, uint32_t cmd_idx) { in SanitizeSegmentCommand() argument
1359 if (m_length == 0 || seg_cmd.filesize == 0) in SanitizeSegmentCommand()
1367 if (strncmp(seg_cmd.segname, "__TEXT", sizeof(seg_cmd.segname)) == 0) in SanitizeSegmentCommand()
1368 m_text_address = seg_cmd.vmaddr; in SanitizeSegmentCommand()
1369 if (strncmp(seg_cmd.segname, "__LINKEDIT", sizeof(seg_cmd.segname)) == 0) in SanitizeSegmentCommand()
1370 m_linkedit_original_offset = seg_cmd.fileoff; in SanitizeSegmentCommand()
1372 seg_cmd.fileoff = seg_cmd.vmaddr - m_text_address; in SanitizeSegmentCommand()
1375 if (seg_cmd.fileoff > m_length) { in SanitizeSegmentCommand()
1383 seg_cmd.cmd == LC_SEGMENT_64 ? "LC_SEGMENT_64" : "LC_SEGMENT"; in SanitizeSegmentCommand()
1388 cmd_idx, lc_segment_name, seg_cmd.fileoff, m_length); in SanitizeSegmentCommand()
1390 seg_cmd.fileoff = 0; in SanitizeSegmentCommand()
1391 seg_cmd.filesize = 0; in SanitizeSegmentCommand()
1394 if (seg_cmd.fileoff + seg_cmd.filesize > m_length) { in SanitizeSegmentCommand()
1402 seg_cmd.cmd == LC_SEGMENT_64 ? "LC_SEGMENT_64" : "LC_SEGMENT"; in SanitizeSegmentCommand()
1407 cmd_idx, lc_segment_name, seg_cmd.fileoff + seg_cmd.filesize, m_length); in SanitizeSegmentCommand()
1410 seg_cmd.filesize = m_length - seg_cmd.fileoff; in SanitizeSegmentCommand()
1415 GetSegmentPermissions(const llvm::MachO::segment_command_64 &seg_cmd) { in GetSegmentPermissions() argument
1417 if (seg_cmd.initprot & VM_PROT_READ) in GetSegmentPermissions()
1419 if (seg_cmd.initprot & VM_PROT_WRITE) in GetSegmentPermissions()
1421 if (seg_cmd.initprot & VM_PROT_EXECUTE) in GetSegmentPermissions()