extern structstd.macho.entry_point_command[src]

The entry_point_command is a replacement for thread_command. It is used for main executables to specify the location (file offset) of main(). If -stack_size was used at link time, the stacksize field will contain the stack size needed for the main thread.

Fields

cmd: LC = .MAIN

LC_MAIN only used in MH_EXECUTE filetypes

cmdsize: u32 = @sizeOf(entry_point_command)

sizeof(struct entry_point_command)

entryoff: u64 = 0

file (__TEXT) offset of main()

stacksize: u64 = 0

if not zero, initial stack size

Source Code

Source code
pub const entry_point_command = extern struct {
    /// LC_MAIN only used in MH_EXECUTE filetypes
    cmd: LC = .MAIN,

    /// sizeof(struct entry_point_command)
    cmdsize: u32 = @sizeOf(entry_point_command),

    /// file (__TEXT) offset of main()
    entryoff: u64 = 0,

    /// if not zero, initial stack size
    stacksize: u64 = 0,
}