Class: Elf::Dynamic::Entry
- Inherits:
-
Object
- Object
- Elf::Dynamic::Entry
- Defined in:
- lib/elf/dynamic.rb
Overview
A .dynamic section entry
Direct Known Subclasses
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(type, file) ⇒ Entry
constructor
A new instance of Entry.
Constructor Details
#initialize(type, file) ⇒ Entry
Returns a new instance of Entry.
175 176 177 178 179 180 181 182 183 |
# File 'lib/elf/dynamic.rb', line 175 def initialize(type, file) @file = file @type = type @value = case type.attribute when :Address then @file.read_addr when :Value then @file.elf_class == Class::Elf32 ? @file.read_word : @file.read_xword else @file.read_addr end end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
173 174 175 |
# File 'lib/elf/dynamic.rb', line 173 def type @type end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
173 174 175 |
# File 'lib/elf/dynamic.rb', line 173 def value @value end |