Class: MachO::LoadCommands::EntryPointCommand
- Inherits:
-
LoadCommand
- Object
- MachOStructure
- LoadCommand
- MachO::LoadCommands::EntryPointCommand
- Defined in:
- lib/macho/load_commands.rb
Overview
A load command specifying the offset of main(). Corresponds to LC_MAIN.
Constant Summary collapse
- FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"L=2Q=2".freeze
- SIZEOF =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
24
Instance Attribute Summary collapse
-
#entryoff ⇒ Integer
readonly
The file (__TEXT) offset of main().
-
#stacksize ⇒ Integer
readonly
If not 0, the initial stack size.
Attributes inherited from LoadCommand
Instance Method Summary collapse
-
#initialize(view, cmd, cmdsize, entryoff, stacksize) ⇒ EntryPointCommand
constructor
private
A new instance of EntryPointCommand.
-
#to_h ⇒ Hash
A hash representation of this EntryPointCommand.
Methods inherited from LoadCommand
create, new_from_bin, #offset, #serializable?, #serialize, #to_s, #type
Methods inherited from MachOStructure
Constructor Details
#initialize(view, cmd, cmdsize, entryoff, stacksize) ⇒ EntryPointCommand
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of EntryPointCommand.
1577 1578 1579 1580 1581 |
# File 'lib/macho/load_commands.rb', line 1577 def initialize(view, cmd, cmdsize, entryoff, stacksize) super(view, cmd, cmdsize) @entryoff = entryoff @stacksize = stacksize end |
Instance Attribute Details
#entryoff ⇒ Integer (readonly)
Returns the file (__TEXT) offset of main().
1563 1564 1565 |
# File 'lib/macho/load_commands.rb', line 1563 def entryoff @entryoff end |
#stacksize ⇒ Integer (readonly)
Returns if not 0, the initial stack size.
1566 1567 1568 |
# File 'lib/macho/load_commands.rb', line 1566 def stacksize @stacksize end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this MachO::LoadCommands::EntryPointCommand.
1584 1585 1586 1587 1588 1589 |
# File 'lib/macho/load_commands.rb', line 1584 def to_h { "entryoff" => entryoff, "stacksize" => stacksize, }.merge super end |