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

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

#include <ELFSourceFile.h>

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

Public Member Functions

 NoBitsSegment (ELFDataSource &source, StELFFile *elf, unsigned index)
 
virtual unsigned getLength ()
 Returns a length based on the data target's address range. More...
 
virtual bool hasNaturalLocation ()
 Pattern segments have no natural address.
 
virtual uint32_t getBaseAddress ()
 Returns the address associated with the segment.
 
- Public Member Functions inherited from blfwk::DataSource::PatternSegment
 PatternSegment (DataSource &source)
 Default constructor.
 
 PatternSegment (DataSource &source, const SizedIntegerValue &pattern)
 Constructor taking a fill pattern.
 
 PatternSegment (DataSource &source, uint8_t pattern)
 Constructor taking a byte fill pattern.
 
 PatternSegment (DataSource &source, uint16_t pattern)
 Constructor taking a half-word fill pattern.
 
 PatternSegment (DataSource &source, uint32_t pattern)
 Constructor taking a word fill pattern.
 
virtual unsigned getData (unsigned offset, unsigned maxBytes, uint8_t *buffer)
 Performs a pattern fill into the buffer.
 
void setPattern (const SizedIntegerValue &newPattern)
 Assigns a new fill pattern.
 
SizedIntegerValuegetPattern ()
 Return the fill pattern for the segment.
 
PatternSegmentoperator= (const SizedIntegerValue &value)
 Assignment operator, sets the pattern value and length.
 
- 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::PatternSegment
SizedIntegerValue m_pattern
 The fill pattern.
 
- Protected Attributes inherited from blfwk::DataSource::Segment
DataSourcem_source
 The data source to which this segment belongs.
 

Detailed Description

Represents one named #SHT_NOBITS section within the ELF file.

This segment class is a subclass of DataSource::PatternSegment since it represents a region of memory to be filled with zeroes.

Member Function Documentation

unsigned ELFSourceFile::ELFDataSource::NoBitsSegment::getLength ( )
virtual

Returns a length based on the data target's address range.

The pattern segment's length is a function of the data target. If the target is bounded, then the segment's length is simply the target's length. Otherwise, if no target has been set or the target is unbounded, then the length returned is 0.

Reimplemented from blfwk::DataSource::PatternSegment.


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