Class: ELFTools::Sections::VersionNeedSection
- Defined in:
- lib/elftools/sections/version_need_section.rb
Overview
Class of the section recording the versions a file needs of the files it is loaded with.
This section is usually named .gnu.version_r, and records the very
versions the DT_VERNEED tag points at.
Instance Attribute Summary
Attributes inherited from Section
Instance Method Summary collapse
-
#initialize(header, stream, section_at: nil, **_kwargs) ⇒ VersionNeedSection
constructor
Instantiate a VersionNeedSection object.
-
#requirements ⇒ Array<ELFTools::VersionTables::Requirement>
The versions this file needs of the files it is loaded with.
Methods inherited from Section
#allocated?, create, #data, #executable?, #name, #null?, #type, #writable?
Constructor Details
#initialize(header, stream, section_at: nil, **_kwargs) ⇒ VersionNeedSection
Instantiate a ELFTools::Sections::VersionNeedSection object.
22 23 24 25 |
# File 'lib/elftools/sections/version_need_section.rb', line 22 def initialize(header, stream, section_at: nil, **_kwargs) @section_at = section_at super end |
Instance Method Details
#requirements ⇒ Array<ELFTools::VersionTables::Requirement>
The versions this file needs of the files it is loaded with.
33 34 35 36 37 |
# File 'lib/elftools/sections/version_need_section.rb', line 33 def requirements @requirements ||= VersionTables.new(stream, @section_at.call(header.sh_link), endian: header.class.self_endian) .requirements(header.sh_offset.to_i, header.sh_info.to_i) end |