Class: Elf::Symbol
- Inherits:
-
Object
- Object
- Elf::Symbol
- Defined in:
- lib/mithril/elf.rb
Overview
All values here are section offsets
Instance Attribute Summary collapse
-
#bind ⇒ Object
Returns the value of attribute bind.
-
#gnu_version ⇒ Object
Returns the value of attribute gnu_version.
-
#hidden ⇒ Object
Returns the value of attribute hidden.
-
#is_dynamic ⇒ Object
Returns the value of attribute is_dynamic.
-
#name ⇒ Object
Returns the value of attribute name.
-
#section ⇒ Object
Returns the value of attribute section.
-
#sectoffset ⇒ Object
Returns the value of attribute sectoffset.
-
#semantics ⇒ Object
Either one of the SHNs or a nil for normal symbols.
-
#size ⇒ Object
Returns the value of attribute size.
-
#type ⇒ Object
Returns the value of attribute type.
-
#visibility ⇒ Object
One of STV.
Instance Method Summary collapse
- #dynamic? ⇒ Boolean
-
#initialize(name, section, type, sectoffset, bind, size) ⇒ Symbol
constructor
A new instance of Symbol.
- #undefined? ⇒ Boolean
- #weak? ⇒ Boolean
Constructor Details
#initialize(name, section, type, sectoffset, bind, size) ⇒ Symbol
Returns a new instance of Symbol.
125 126 127 128 129 130 131 |
# File 'lib/mithril/elf.rb', line 125 def initialize(name,section,type,sectoffset, bind,size) @name,@section, @type, @sectoffset, @bind, @size = name.to_s,section,type,sectoffset, bind,size @is_dynamic = false @gnu_version = :global @visibility = ElfFlags::SymbolVisibility::STV_DEFAULT @hidden = false end |
Instance Attribute Details
#bind ⇒ Object
Returns the value of attribute bind.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def bind @bind end |
#gnu_version ⇒ Object
Returns the value of attribute gnu_version.
113 114 115 |
# File 'lib/mithril/elf.rb', line 113 def gnu_version @gnu_version end |
#hidden ⇒ Object
Returns the value of attribute hidden.
113 114 115 |
# File 'lib/mithril/elf.rb', line 113 def hidden @hidden end |
#is_dynamic ⇒ Object
Returns the value of attribute is_dynamic.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def is_dynamic @is_dynamic end |
#name ⇒ Object
Returns the value of attribute name.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def name @name end |
#section ⇒ Object
Returns the value of attribute section.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def section @section end |
#sectoffset ⇒ Object
Returns the value of attribute sectoffset.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def sectoffset @sectoffset end |
#semantics ⇒ Object
Either one of the SHNs or a nil for normal symbols
115 116 117 |
# File 'lib/mithril/elf.rb', line 115 def semantics @semantics end |
#size ⇒ Object
Returns the value of attribute size.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def size @size end |
#type ⇒ Object
Returns the value of attribute type.
112 113 114 |
# File 'lib/mithril/elf.rb', line 112 def type @type end |
#visibility ⇒ Object
One of STV
114 115 116 |
# File 'lib/mithril/elf.rb', line 114 def visibility @visibility end |
Instance Method Details
#dynamic? ⇒ Boolean
116 117 118 |
# File 'lib/mithril/elf.rb', line 116 def dynamic? is_dynamic end |
#undefined? ⇒ Boolean
119 120 121 |
# File 'lib/mithril/elf.rb', line 119 def undefined? semantics == SHN::SHN_UNDEF end |
#weak? ⇒ Boolean
122 123 124 |
# File 'lib/mithril/elf.rb', line 122 def weak? bind == STB::STB_WEAK end |