extern struct segment_command_64 [src]

The 64-bit segment load command indicates that a part of this file is to be mapped into a 64-bit task's address space. If the 64-bit segment has sections then section_64 structures directly follow the 64-bit segment command and their size is reflected in cmdsize.

Fields

cmd: LC = .SEGMENT_64LC_SEGMENT_64
cmdsize: u32includes sizeof section_64 structs
segname: [16]u8segment name
vmaddr: u64 = 0memory address of this segment
vmsize: u64 = 0memory size of this segment
fileoff: u64 = 0file offset of this segment
filesize: u64 = 0amount to map from the file
maxprot: vm_prot_t = PROT.NONEmaximum VM protection
initprot: vm_prot_t = PROT.NONEinitial VM protection
nsects: u32 = 0number of sections in segment
flags: u32 = 0

Members

Source

pub const segment_command_64 = extern struct { /// LC_SEGMENT_64 cmd: LC = .SEGMENT_64, /// includes sizeof section_64 structs cmdsize: u32, // TODO lazy values in stage2 // cmdsize: u32 = @sizeOf(segment_command_64), /// segment name segname: [16]u8, /// memory address of this segment vmaddr: u64 = 0, /// memory size of this segment vmsize: u64 = 0, /// file offset of this segment fileoff: u64 = 0, /// amount to map from the file filesize: u64 = 0, /// maximum VM protection maxprot: vm_prot_t = PROT.NONE, /// initial VM protection initprot: vm_prot_t = PROT.NONE, /// number of sections in segment nsects: u32 = 0, flags: u32 = 0, pub fn segName(seg: *const segment_command_64) []const u8 { return parseName(&seg.segname); } pub fn isWriteable(seg: segment_command_64) bool { return seg.initprot & PROT.WRITE != 0; } }