Zig 0.17.0-dev (Split by item)

Shortcut keys
?
Show these tips
S
Focus search field
Esc
Clear focus & close tips
U
Jump to source code
↑
Move up in search results
↓
Move down in search results
↵
Go to active search result
This is an example of documentation generated by ZigDoc, an alternative to Zig's built-in Auto Doc feature. See also examples in other modes/formats. The project being documented here (as the example) is the Zig standard library. Public Struct

segment_command_64

Public Struct
std.macho.segment_command_64
pub const segment_command_64 = extern struct

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_64

LC_SEGMENT_64

cmdsize: u32

includes sizeof section_64 structs

segname: [16]u8

segment name

vmaddr: u64 = 0

memory address of this segment

vmsize: u64 = 0

memory size of this segment

fileoff: u64 = 0

file offset of this segment

filesize: u64 = 0

amount to map from the file

maxprot: vm_prot_t = .{}

maximum VM protection

initprot: vm_prot_t = .{}

initial VM protection

nsects: u32 = 0

number of sections in segment

flags: u32 = 0

Functions

pub fn segName(seg: *const segment_command_64) []const u8
pub fn isWriteable(seg: segment_command_64) bool

File

macho.zig:657
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
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 = .{},

    /// initial VM protection
    initprot: vm_prot_t = .{},

    /// 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.write;
    }
}