RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
DOS16M::BWFormat::AbstractSegment Class Referenceabstract
Inheritance diagram for DOS16M::BWFormat::AbstractSegment:
DOS16M::BWFormat::DummySegment DOS16M::BWFormat::RelocationSegment DOS16M::BWFormat::Segment

Public Types

enum  access_type { TYPE_DATA = 0x92 , TYPE_CODE = 0x9A }
 
enum  flag_type { FLAG_EMPTY = 0x2000 , FLAG_TRANSPARENT = 0x8000 }
 

Public Member Functions

 AbstractSegment (unsigned access=TYPE_DATA, unsigned flags=0, uint32_t total_length=0)
 
uint32_t GetTotalSize ()
 Retrieves the total size of the segment, including the bss.
 
virtual void SetTotalSize (uint32_t new_value)
 Modifies the total size of the segment, including the bss. Note that this is not guaranteed to work for all segment types.
 
virtual uint32_t GetSize (BWFormat &bw)=0
 Retrieves size of segment. Some subclasses might calculate this dynamically.
 
virtual void WriteContent (Linker::Writer &wr, BWFormat &bw)=0
 Produces the binary contents of the segment.
 
void WriteHeader (Linker::Writer &wr, BWFormat &bw)
 Produces the GDT entry for the header.
 

Public Attributes

access_type access
 
flag_type flags
 
uint32_t address = 0
 
uint32_t total_length
 

Member Function Documentation

◆ GetSize()

virtual uint32_t DOS16M::BWFormat::AbstractSegment::GetSize ( BWFormat & bw)
pure virtual

Retrieves size of segment. Some subclasses might calculate this dynamically.

Implemented in DOS16M::BWFormat::Segment, DOS16M::BWFormat::DummySegment, and DOS16M::BWFormat::RelocationSegment.

◆ SetTotalSize()

void BWFormat::AbstractSegment::SetTotalSize ( uint32_t new_value)
virtual

Modifies the total size of the segment, including the bss. Note that this is not guaranteed to work for all segment types.

Reimplemented in DOS16M::BWFormat::Segment, DOS16M::BWFormat::DummySegment, and DOS16M::BWFormat::RelocationSegment.

◆ WriteContent()

virtual void DOS16M::BWFormat::AbstractSegment::WriteContent ( Linker::Writer & wr,
BWFormat & bw )
pure virtual

Produces the binary contents of the segment.

Implemented in DOS16M::BWFormat::Segment, DOS16M::BWFormat::DummySegment, and DOS16M::BWFormat::RelocationSegment.


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