Class: MachO::EntryPointCommand

Inherits:
LoadCommand show all
Defined in:
lib/macho/load_commands.rb

Overview

A load command specifying the offset of main(). Corresponds to LC_MAIN.

Instance Attribute Summary collapse

Attributes inherited from LoadCommand

#cmd, #cmdsize, #offset

Instance Method Summary collapse

Methods inherited from LoadCommand

new_from_bin, #to_s

Methods inherited from MachOStructure

bytesize, new_from_bin

Constructor Details

#initialize(offset, cmd, cmdsize, entryoff, stacksize) ⇒ EntryPointCommand

Returns a new instance of EntryPointCommand.



1065
1066
1067
1068
1069
# File 'lib/macho/load_commands.rb', line 1065

def initialize(offset, cmd, cmdsize, entryoff, stacksize)
  super(offset, cmd, cmdsize)
  @entryoff = entryoff
  @stacksize = stacksize
end

Instance Attribute Details

#entryoffFixnum (readonly)

Returns the file (__TEXT) offset of main().

Returns:

  • (Fixnum)

    the file (__TEXT) offset of main()



1056
1057
1058
# File 'lib/macho/load_commands.rb', line 1056

def entryoff
  @entryoff
end

#stacksizeFixnum (readonly)

Returns if not 0, the initial stack size.

Returns:

  • (Fixnum)

    if not 0, the initial stack size.



1059
1060
1061
# File 'lib/macho/load_commands.rb', line 1059

def stacksize
  @stacksize
end