RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Linker::Image Class Referenceabstract
Inheritance diagram for Linker::Image:
Linker::Contents Linker::Buffer Linker::Segment Microsoft::LEFormat::IteratedPage Microsoft::LEFormat::IteratedPage::View Microsoft::LEFormat::PageSet Microsoft::LEFormat::SegmentPage Microsoft::PEFormat::MemoryPortionImage Linker::Section Linker::TableSection< GOTEntry > Linker::TableSection< TableEntryType > Linker::GlobalOffsetTable

Public Member Functions

std::shared_ptr< const Image > AsImage () const override
 Retrieves a randomly accessible image.
 
virtual size_t ReadData (size_t bytes, offset_t offset, void *buffer) const =0
 Attempts to fill a buffer with data.
 
uint64_t ReadUnsigned (size_t bytes, offset_t offset, EndianType endiantype) const
 Reads an unsigned number at a specific offset.
 
uint64_t ReadUnsigned (size_t bytes, offset_t offset) const
 Reads an unsigned number at a specific offset with the default endianness.
 
int64_t ReadSigned (size_t bytes, offset_t offset, EndianType endiantype) const
 Reads a signed number at a specific offset.
 
int64_t ReadSigned (size_t bytes, offset_t offset) const
 Reads a signed number at a specific offset with the default endianness.
 
int GetByte (offset_t offset) const
 Retrieve byte at a certain offset (optional, might not be defined)
 
virtual offset_t WriteFile (const std::shared_ptr< Writer > &wr, offset_t count, offset_t offset=0) const
 Writes data of non-zero filled sections.
 
offset_t WriteFile (const std::shared_ptr< Writer > &wr) const override
 Writes data of non-zero filled sections.
 
virtual offset_t WriteFile (const std::shared_ptr< Writer > &wr) const=0
 Writes data of non-zero filled sections.
 
- Public Member Functions inherited from Linker::Contents
virtual offset_t ImageSize () const =0
 Retrieves the offset of the byte after the last one belonging to this format from the first one.
 
std::shared_ptr< Image > AsImage ()
 Retrieves a randomly accessible image.
 

Member Function Documentation

◆ AsImage()

std::shared_ptr< const Image > Image::AsImage ( ) const
overridevirtual

Retrieves a randomly accessible image.

Reimplemented from Linker::Contents.

Reimplemented in Microsoft::LEFormat::SegmentPage.

◆ ReadData()

virtual size_t Linker::Image::ReadData ( size_t  bytes,
offset_t  offset,
void *  buffer 
) const
pure virtual

Attempts to fill a buffer with data.

Parameters
bytesThe (maximum) number of bytes to place in buffer
offsetThe offset in the image to start reading the data
bufferA byte buffer
Returns
Actual number of bytes copied into buffer

Implemented in Microsoft::LEFormat::PageSet, Microsoft::LEFormat::SegmentPage, Microsoft::LEFormat::IteratedPage, Microsoft::LEFormat::IteratedPage::View, Microsoft::PEFormat::MemoryPortionImage, Linker::Buffer, Linker::Section, Linker::Segment, Linker::TableSection< TableEntryType >, and Linker::TableSection< GOTEntry >.

◆ WriteFile() [1/3]

offset_t Image::WriteFile ( const std::shared_ptr< Writer > &  wr) const
overridevirtual

◆ WriteFile() [2/3]

virtual offset_t Linker::Contents::WriteFile ( const std::shared_ptr< Writer > &  wr) const
virtual

◆ WriteFile() [3/3]

offset_t Image::WriteFile ( const std::shared_ptr< Writer > &  wr,
offset_t  count,
offset_t  offset = 0 
) const
virtual

The documentation for this class was generated from the following files: