Zig 0.17.0-dev (Split by item)

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 library itself.

EhdrFlags

elf.EhdrFlags
pub const EhdrFlags = packed union(Word)

File

lib/std/elf.zig:3380

Code

pub const EhdrFlags = packed union(Word) {
    int: u32,
    loongarch: Loongarch,
    sparc: Sparc,

    pub const Loongarch = packed struct(u32) {
        base_abi_modifier: BaseAbiModifier,
        abi_extension: AbiExtension,
        abi_version: u2,
        reserved: u24 = 0,

        pub const BaseAbiModifier = enum(u3) {
            s = 1,
            f = 2,
            d = 3,
            _,
        };
        pub const AbiExtension = enum(u3) { base = 0, _ };
    };

    pub const Sparc = packed struct(u32) {
        mm: MemoryModel,
        _reserved1: u6 = 0,
        ext: Extensions,
        _reserved2: u8 = 0,

        pub const MemoryModel = enum(u2) {
            /// Total Store Ordering
            tso = 0,
            /// Partial Store Ordering
            pso = 1,
            /// Relaxed Memory Ordering
            rmo = 2,
        };

        pub const Extensions = packed struct(u16) {
            /// Uses SPARC v8 ABI (w/ 32-bit pointers) on SPARC v9. Also known as v8+.
            @"32plus": bool,
            /// Uses Sun UltraSPARC extensions.
            sun_us1: bool,
            /// Uses HaL R1 extensions.
            hal_r1: bool,
            /// Uses Sun UltraSPARC III extensions.
            sun_us3: bool,
            _reserved: u11 = 0,
            /// Uses little endian data (SPARC v9+).
            le_data: bool,
        };
    };
}