ELF::Extract::Sections::Scanner::Objdump - An objdump based section scanner.
objdump
version 0.03000101
This module is a model implementation of a Naive and system reliant ELF Section detector. Its currently highly inefficient due to having to run the entire ELF through a disassembly process to determine the section positions and only guesses at section lengths by advertising that it can't compute sizes.
TO use this module, simply initialise ELF::Extract::Sections as so
my $extractor = ELF::Extract::Sections->new( file => "/path/to/file.so" , scanner => "Objdump", );
ELF::Extract::Sections::Meta::Scanner
Lots of keywords.
MooseX::Has::Sugar
Type Constraining Keywords.
MooseX::Types::Moose
File Type Constraints w/ Path::Tiny
MooseX::Types::Path::Tiny
Opens the file and assigns our state to that file.
"open_file" in ELF::Extract::Sections::Meta::Scanner
Advances our state to the next section.
"next_section" in ELF::Extract::Sections::Meta::Scanner
Reports the offset of the currently open section
"section_offset" in ELF::Extract::Sections::Meta::Scanner
Dies, because this module can't compute section sizes.
"section_size" in ELF::Extract::Sections::Meta::Scanner
Returns the name of the current section
"section_name" in ELF::Extract::Sections::Meta::Scanner
Returns false
"can_compute_size" in ELF::Extract::Sections::Meta::Scanner
A regular expression for identifying the
<asdasdead>
Style tokens that denote objdump header names.
Note: This is not XML.
A regular expression for identifying offset blocks in objdump's output.
They look like this:
File Offset: 0xdeadbeef
A regular expression for extracting Headers and Offsets together
<headername> File Offset: 0xdeadbeef
A Path::Tiny reference to a file somewhere on a system
Clears "_file"
A perl FileHandle that points to the output of objdump for "_file"
Clears "_filehandle"
Keeps track of what we're doing, and what the next header is to return.
Returns is-set of "_state"
Clears _state
Assembles "_header_regex" and "_offset_regex"
"_section_header_identifier"
Calls the system objdump instance for the currently processing file.
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2013 by Kent Fredric.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install ELF::Extract::Sections, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ELF::Extract::Sections
CPAN shell
perl -MCPAN -e shell install ELF::Extract::Sections
For more information on module installation, please visit the detailed CPAN module installation guide.