1#ifndef ROSE_BinaryAnalysis_BinaryLoaderPe_H
2#define ROSE_BinaryAnalysis_BinaryLoaderPe_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/BinaryLoader.h>
8namespace BinaryAnalysis {
61 rose_addr_t *malign_lo, rose_addr_t *malign_hi,
62 rose_addr_t *va, rose_addr_t *mem_size,
63 rose_addr_t *offset, rose_addr_t *file_size,
bool *map_private,
64 rose_addr_t *va_offset,
bool *anon_lo,
bool *anon_hi,
82 virtual std::string
findSoFile(
const std::string &libname)
const override;
Loader for Windows PE files.
virtual bool isLinked(SgAsmInterpretation *interp, const std::string &filename) override
Returns true if the specified file name is already linked into the AST.
static Ptr instance()
Allocating constructor.
BinaryLoaderPePtr Ptr
Reference counting pointer to BinaryLoaderPe.
virtual void link(SgAsmInterpretation *interp) override
Finds and parses all shared objects needed by an interpretation.
virtual BinaryLoaderPtr clone() const override
Creates a new copy of a loader.
virtual rose_addr_t rebase(const MemoryMap::Ptr &, SgAsmGenericHeader *, const SgAsmGenericSectionPtrList &) override
Returns a new, temporary base address which is greater than everything that's been mapped already.
virtual SgAsmGenericSectionPtrList getRemapSections(SgAsmGenericHeader *) override
Selects those sections of a header that should be mapped.
virtual MappingContribution alignValues(SgAsmGenericSection *, const MemoryMap::Ptr &, rose_addr_t *malign_lo, rose_addr_t *malign_hi, rose_addr_t *va, rose_addr_t *mem_size, rose_addr_t *offset, rose_addr_t *file_size, bool *map_private, rose_addr_t *va_offset, bool *anon_lo, bool *anon_hi, ConflictResolution *resolve) override
Windows-specific PE section alignment.
virtual bool canLoad(SgAsmGenericHeader *) const override
Predicate determining the suitability of a loader for a specific file header.
virtual bool isLinked(SgBinaryComposite *composite, const std::string &filename) override
Returns true if the specified file name is already linked into the AST.
virtual std::string findSoFile(const std::string &libname) const override
Convert name to fully qualified name.
virtual void fixup(SgAsmInterpretation *interp, FixupErrors *errors=NULL) override
Performs relocation fixups on the specified interpretation.
void addLibDefaults(SgAsmGenericHeader *header=NULL)
Sets up library search paths and preloads from the environment.
Base class for loading a static or dynamic object.
MappingContribution
Describes how a section contributes to the overall memory map.
bool performingRemap() const
Property: Whether this loader will perform the mapping step.
ConflictResolution
Describes how conflicts are resolved when mapping a section.
bool performingRelocations() const
Property: Whether this loader will perform the relocation step.
bool performingDynamicLinking() const
Property: Whether this loader will perform the linking step.
Reference-counting intrusive smart pointer.
Contiguous region of a file.
Represents an interpretation of a binary container.
Sawyer::SharedPointer< BinaryLoaderPe > BinaryLoaderPePtr
Refernce counting pointer.
Sawyer::SharedPointer< BinaryLoader > BinaryLoaderPtr
Reference counting pointer.