Class: MachO::Section64
- Inherits:
-
MachOStructure
- Object
- MachOStructure
- MachO::Section64
- Defined in:
- lib/macho/sections.rb
Instance Attribute Summary collapse
-
#addr ⇒ Object
readonly
Returns the value of attribute addr.
-
#align ⇒ Object
readonly
Returns the value of attribute align.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#nreloc ⇒ Object
readonly
Returns the value of attribute nreloc.
-
#offset ⇒ Object
readonly
Returns the value of attribute offset.
-
#reloff ⇒ Object
readonly
Returns the value of attribute reloff.
-
#reserved1 ⇒ Object
readonly
Returns the value of attribute reserved1.
-
#reserved2 ⇒ Object
readonly
Returns the value of attribute reserved2.
-
#reserved3 ⇒ Object
readonly
Returns the value of attribute reserved3.
-
#sectname ⇒ Object
readonly
Returns the value of attribute sectname.
-
#segname ⇒ Object
readonly
Returns the value of attribute segname.
-
#size ⇒ Object
readonly
Returns the value of attribute size.
Instance Method Summary collapse
- #flag?(flag) ⇒ Boolean
-
#initialize(sectname, segname, addr, size, offset, align, reloff, nreloc, flags, reserved1, reserved2, reserved3) ⇒ Section64
constructor
A new instance of Section64.
- #section_name ⇒ Object
- #segment_name ⇒ Object
Methods inherited from MachOStructure
Constructor Details
#initialize(sectname, segname, addr, size, offset, align, reloff, nreloc, flags, reserved1, reserved2, reserved3) ⇒ Section64
Returns a new instance of Section64.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/macho/sections.rb', line 101 def initialize(sectname, segname, addr, size, offset, align, reloff, nreloc, flags, reserved1, reserved2, reserved3) @sectname = sectname @segname = segname @addr = addr @size = size @offset = offset @align = align @reloff = reloff @nreloc = nreloc @flags = flags @reserved1 = reserved1 @reserved2 = reserved2 @reserved3 = reserved3 end |
Instance Attribute Details
#addr ⇒ Object (readonly)
Returns the value of attribute addr.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def addr @addr end |
#align ⇒ Object (readonly)
Returns the value of attribute align.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def align @align end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
96 97 98 |
# File 'lib/macho/sections.rb', line 96 def flags @flags end |
#nreloc ⇒ Object (readonly)
Returns the value of attribute nreloc.
96 97 98 |
# File 'lib/macho/sections.rb', line 96 def nreloc @nreloc end |
#offset ⇒ Object (readonly)
Returns the value of attribute offset.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def offset @offset end |
#reloff ⇒ Object (readonly)
Returns the value of attribute reloff.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def reloff @reloff end |
#reserved1 ⇒ Object (readonly)
Returns the value of attribute reserved1.
96 97 98 |
# File 'lib/macho/sections.rb', line 96 def reserved1 @reserved1 end |
#reserved2 ⇒ Object (readonly)
Returns the value of attribute reserved2.
96 97 98 |
# File 'lib/macho/sections.rb', line 96 def reserved2 @reserved2 end |
#reserved3 ⇒ Object (readonly)
Returns the value of attribute reserved3.
96 97 98 |
# File 'lib/macho/sections.rb', line 96 def reserved3 @reserved3 end |
#sectname ⇒ Object (readonly)
Returns the value of attribute sectname.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def sectname @sectname end |
#segname ⇒ Object (readonly)
Returns the value of attribute segname.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def segname @segname end |
#size ⇒ Object (readonly)
Returns the value of attribute size.
95 96 97 |
# File 'lib/macho/sections.rb', line 95 def size @size end |
Instance Method Details
#flag?(flag) ⇒ Boolean
125 126 127 |
# File 'lib/macho/sections.rb', line 125 def flag?(flag) flags & flag == flag end |
#section_name ⇒ Object
117 118 119 |
# File 'lib/macho/sections.rb', line 117 def section_name @sectname.delete("\x00") end |
#segment_name ⇒ Object
121 122 123 |
# File 'lib/macho/sections.rb', line 121 def segment_name @segname.delete("\x00") end |