Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
blfwk::ELFSourceFile::ELFDataSource::ProgBitsSegment Class Reference

Represents one named #SHT_PROGBITS section within the ELF file. More...

#include <ELFSourceFile.h>

+ Inheritance diagram for blfwk::ELFSourceFile::ELFDataSource::ProgBitsSegment:
+ Collaboration diagram for blfwk::ELFSourceFile::ELFDataSource::ProgBitsSegment:

Public Member Functions

 ProgBitsSegment (ELFDataSource &source, StELFFile *elf, unsigned index)
 
virtual unsigned getData (unsigned offset, unsigned maxBytes, uint8_t *buffer)
 Gets all or a portion of the segment's data. More...
 
virtual unsigned getLength ()
 Gets the length of the segment's data.
 
virtual bool hasNaturalLocation ()
 Returns whether the segment has an associated address.
 
virtual uint32_t getBaseAddress ()
 Returns the address associated with the segment.
 
- Public Member Functions inherited from blfwk::DataSource::Segment
 Segment (DataSource &source)
 Default constructor.
 
virtual ~Segment ()
 Destructor.
 

Protected Attributes

StELFFilem_elf
 The format parser instance for this ELF file.
 
unsigned m_sectionIndex
 The index of the section this segment represents.
 
- Protected Attributes inherited from blfwk::DataSource::Segment
DataSourcem_source
 The data source to which this segment belongs.
 

Detailed Description

Represents one named #SHT_PROGBITS section within the ELF file.

Member Function Documentation

unsigned ELFSourceFile::ELFDataSource::ProgBitsSegment::getData ( unsigned  offset,
unsigned  maxBytes,
uint8_t *  buffer 
)
virtual

Gets all or a portion of the segment's data.

The data is copied into buffer. Up to maxBytes bytes may be copied, so buffer must be at least that large.

Parameters
offsetIndex of the first byte to start copying from.
maxBytesThe maximum number of bytes that can be returned. buffer must be at least this large.
bufferPointer to buffer where the data is copied.
Returns
The number of bytes copied into buffer.

Implements blfwk::DataSource::Segment.


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