LoaderELF Class Reference

#include <LoaderELF.h>

Inheritance diagram for LoaderELF:

Inheritance graph
[legend]
Collaboration diagram for LoaderELF:

Collaboration graph
[legend]
List of all members.

Detailed Description

An executable loader suitable for ELF binaries.


Public Member Functions

virtual ~LoaderELF ()
virtual bool can_handle (SgAsmGenericHeader *header)
 Indicates whether a loader can handle a specific type of file.
virtual SgAsmGenericSectionPtrList order_sections (const SgAsmGenericSectionPtrList &)
 Sort sections for mapping.
virtual rose_addr_t align_values (SgAsmGenericSection *, Contribution, rose_addr_t *va, rose_addr_t *mem_size, rose_addr_t *offset, rose_addr_t *file_size, const MemoryMap *current)
virtual MemoryMapload_code_sections (MemoryMap *, const SgAsmGenericSectionPtrList &, bool allow_overmap=true)


Constructor & Destructor Documentation

virtual LoaderELF::~LoaderELF (  )  [inline, virtual]


Member Function Documentation

virtual bool LoaderELF::can_handle ( SgAsmGenericHeader header  )  [inline, virtual]

Indicates whether a loader can handle a specific type of file.

Returns true if the loader is able to handle the specified file header. For instance, the LoaderELFObj loader would return true if the header is for an ELF object file. The generic Loader advertises that it can handle all types of file headers, so subclasses should definitely override this.

Reimplemented from Loader.

Reimplemented in LoaderELFObj.

SgAsmGenericSectionPtrList LoaderELF::order_sections ( const SgAsmGenericSectionPtrList  )  [virtual]

Sort sections for mapping.

Given a list of sections, sort the sections according to the order they should contribute to the mapping. For instance, ELF Segments should contribute to the mapping before ELF Sections.

This method can also be used as a first-line for excluding sections that meet certain criteria. It is called by create_map() before sections are passed through the Selector object. The default implementation excludes any section that was synthesized by the binary parser, keeping only those that were created due to the parser encountering a description of the section in some kind of table.

Reimplemented from Loader.

rose_addr_t LoaderELF::align_values ( SgAsmGenericSection ,
Contribution  ,
rose_addr_t *  va,
rose_addr_t *  mem_size,
rose_addr_t *  offset,
rose_addr_t *  file_size,
const MemoryMap current 
) [virtual]

Reimplemented in LoaderELFObj.

MemoryMap * LoaderELF::load_code_sections ( MemoryMap ,
const SgAsmGenericSectionPtrList ,
bool  allow_overmap = true 
) [virtual]


The documentation for this class was generated from the following files:
Generated on Mon Aug 30 21:33:56 2010 for ROSE by  doxygen 1.4.7