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
COFF::COFFFormat::Section Class Reference

A COFF section. More...

#include <coff.h>

Public Types

enum  { TEXT = 0x0020 , DATA = 0x0040 , BSS = 0x0080 }
 COFF section flags. More...
 

Public Member Functions

void Clear ()
 
 Section (uint32_t flags=0, std::shared_ptr< Linker::Writable > image=nullptr)
 
void ReadSectionHeader (Linker::Reader &rd)
 
void WriteSectionHeader (Linker::Writer &wr)
 
uint32_t ActualDataSize ()
 

Public Attributes

std::string name
 The name of the section (COFF name: s_name)
 
uint32_t physical_address = 0
 The physical address of the section (expected to be identical to the virtual address) (COFF name: s_paddr)
 
uint32_t address = 0
 The virtual address of the section (COFF name: s_vaddr)
 
uint32_t size = 0
 The size of the section (COFF name: s_size)
 
uint32_t section_pointer = 0
 Offset of stored image data from COFF header start (COFF name: s_scnptr)
 
uint32_t relocation_pointer = 0
 Offset to COFF relocations (COFF name: s_relptr)
 
uint32_t line_number_pointer = 0
 unused (COFF name: s_lnnoptr)
 
uint16_t relocation_count = 0
 COFF relocation count (COFF name: s_nreloc)
 
uint16_t line_number_count = 0
 unused (COFF name: s_nlnno)
 
uint32_t flags = 0
 COFF section flags, determines the type of the section (text, data, bss, etc.) (COFF name: s_flags)
 
std::shared_ptr< Linker::Writableimage
 The stored image data.
 
std::vector< std::unique_ptr< Relocation > > relocations
 Collection of COFF relocations.
 

Detailed Description

A COFF section.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

COFF section flags.

Enumerator
TEXT 

Section contains executable (COFF name: STYP_TEXT)

DATA 

Section contains initialized data (COFF name: STYP_DATA)

BSS 

Section contains uninitialized data (COFF name: STYP_BSS)


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