Why not adopt me?
NAME
ELF::Extract::Sections::Scanner::Objdump - An objdump
based section scanner.
VERSION
version 0.02020308
SYNOPSIS
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",
);
IMPLEMENTS ROLES
ELF::Extract::Sections::Meta::Scanner
ELF::Extract::Sections::Meta::Scanner
DEPENDS
MooseX::Has::Sugar
Lots of keywords.
MooseX::Types::Moose
Type Constraining Keywords.
MooseX::Types::Path::Class
File Type Constraints w/ Path::Class
PUBLIC METHODS
-> open_file ( file => File ) : Bool ::Scanner
Opens the file and assigns our state to that file.
"open_file" in ELF::Extract::Sections::Meta::Scanner
-> next_section () : Bool ::Scanner
Advances our state to the next section.
"next_section" in ELF::Extract::Sections::Meta::Scanner
-> section_offset () : Int | Undef ::Scanner
Reports the offset of the currently open section
"section_offset" in ELF::Extract::Sections::Meta::Scanner
-> section_size () : Undef ::Scanner
Dies, because this module can't compute section sizes.
"section_size" in ELF::Extract::Sections::Meta::Scanner
-> section_name () : Str | Undef ::Scanner
Returns the name of the current section
"section_name" in ELF::Extract::Sections::Meta::Scanner
-> can_compute_size () : Bool ::Scanner
Returns false
"can_compute_size" in ELF::Extract::Sections::Meta::Scanner
PRIVATE ATTRIBUTES
-> _header_regex : RegexpRef
A regular expression for identifying the
<asdasdead>
Style tokens that denote objdump header names.
Note: This is not XML.
-> _offset_regex : RegexpRef
A regular expression for identifying offset blocks in objdump's output.
They look like this:
File Offset: 0xdeadbeef
-> _section_header_identifier : RegexpRef
A regular expression for extracting Headers and Offsets together
<headername> File Offset: 0xdeadbeef
-> _file : File
A Path::Class::File reference to a file somewhere on a system
clearer -> _clear_file
-> _filehandle : FileHandle
A perl FileHandle that points to the output of objdump for "_file"
clearer -> _clear_file_handle
-> _state : HashRef
Keeps track of what we're doing, and what the next header is to return.
predicate -> _has_state
clearer -> _clear_state
PRIVATE ATTRIBUTE BUILDERS
-> _build__section_header_identifier : RegexpRef
Assembles "_header_regex" and "_offset_regex"
PRIVATE METHODS
-> _objdump : FileHandle | Undef
Calls the system objdump
instance for the currently processing file.
AUTHOR
Kent Fredric <kentnl@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2009 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.