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

CodeDirectory

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

This CodeDirectory is tailored specifically at version 0x20400.

Fields

magic: u32

Magic number (CSMAGIC_CODEDIRECTORY)

length: u32

Total length of CodeDirectory blob

version: u32

Compatibility version

flags: u32

Setup and mode flags

hashOffset: u32

Offset of hash slot element at index zero

identOffset: u32

Offset of identifier string

nSpecialSlots: u32

Number of special hash slots

nCodeSlots: u32

Number of ordinary (code) hash slots

codeLimit: u32

Limit to main image signature range

hashSize: u8

Size of each hash in bytes

hashType: u8

Type of hash (cdHashType* constants)

platform: u8

Platform identifier; zero if not platform binary

pageSize: u8

log2(page size in bytes); 0 => infinite

spare2: u32

Unused (must be zero)

scatterOffset: u32
teamOffset: u32
spare3: u32
codeLimit64: u64
execSegBase: u64

Offset of executable segment

execSegLimit: u64

Limit of executable segment

execSegFlags: u64

Executable segment flags

File

macho.zig:1828
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
pub const CodeDirectory = extern struct {
    /// Magic number (CSMAGIC_CODEDIRECTORY)
    magic: u32,

    /// Total length of CodeDirectory blob
    length: u32,

    /// Compatibility version
    version: u32,

    /// Setup and mode flags
    flags: u32,

    /// Offset of hash slot element at index zero
    hashOffset: u32,

    /// Offset of identifier string
    identOffset: u32,

    /// Number of special hash slots
    nSpecialSlots: u32,

    /// Number of ordinary (code) hash slots
    nCodeSlots: u32,

    /// Limit to main image signature range
    codeLimit: u32,

    /// Size of each hash in bytes
    hashSize: u8,

    /// Type of hash (cdHashType* constants)
    hashType: u8,

    /// Platform identifier; zero if not platform binary
    platform: u8,

    /// log2(page size in bytes); 0 => infinite
    pageSize: u8,

    /// Unused (must be zero)
    spare2: u32,

    ///
    scatterOffset: u32,

    ///
    teamOffset: u32,

    ///
    spare3: u32,

    ///
    codeLimit64: u64,

    /// Offset of executable segment
    execSegBase: u64,

    /// Limit of executable segment
    execSegLimit: u64,

    /// Executable segment flags
    execSegFlags: u64,
}