RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
COFF::COFFFormat::Symbol Class Reference

A COFF symbol. More...

#include <coff.h>

Classes

class  ArrayAuxiliaryEntry
 
class  AuxiliaryEntry
 
class  BeginOrEndAuxiliaryEntry
 
class  EndOfStructureAuxiliaryEntry
 
class  FileNameAuxiliaryEntry
 
class  FunctionAuxiliaryEntry
 
class  SectionAuxiliaryEntry
 
class  StructureAuxiliaryEntry
 
class  TagNameAuxiliaryEntry
 

Public Types

enum  {
  C_EFCN = uint8_t(-1) , C_NULL = 0 , C_AUTO , C_EXT ,
  C_STAT , C_REG , C_EXTDEF , C_LABEL ,
  C_ULABEL , C_MOS , C_ARG , C_STRTAG ,
  C_MOU , C_UNTAG , C_TPDEF , C_USTATIC ,
  C_ENTAG , C_MOE , C_REGPARM , C_FIELD ,
  C_BLOCK = 100 , C_FCN , C_EOS , C_FILE ,
  C_LINE , C_ALIAS , C_HIDDEN , C_SHADOW ,
  C_WEAKEXT
}
 
enum  { N_DEBUG = uint16_t(-2) , N_ABS = uint16_t(-1) , N_UNDEF = 0 }
 
enum  {
  T_NULL = 0 , T_ARG , T_CHAR , T_SHORT ,
  T_INT , T_LONG , T_FLOAT , T_DOUBLE ,
  T_STRUCT , T_UNION , T_ENUM , T_MOE ,
  T_UCHAR , T_USHORT , T_UINT , T_ULONG
}
 
enum  { DT_NON = 0 , DT_PTR , DT_FCN , DT_ARY }
 

Public Member Functions

void Read (Linker::Reader &rd)
 
bool IsExternal () const
 

Public Attributes

std::string name
 Symbol name (COFF name: n_name, if it fits inside field)
 
uint32_t name_index
 The index of the symbol name within the string table, if not stored directly in the entry, 0 otherwise (COFF name: n_name)
 
uint32_t value
 The actual value of the symbol (COFF name: n_value)
 
uint16_t section_number
 The number of the section, with special values 0 (N_UNDEF), 1 (N_ABS) and 2 (N_DEBUG) (COFF name: n_scnum)
 
uint16_t type
 The symbol type (COFF name: n_type)
 
uint8_t storage_class
 COFF name: n_sclass, typical values are 2 (C_EXT), 3 (C_STAT)
 
uint8_t auxiliary_count
 Signifies how many extra entries are present, these should be skipped, 0 is a typical value (COFF name: n_numaux)
 
std::unique_ptr< AuxiliaryEntryauxiliary_entry = nullptr
 

Detailed Description

A COFF symbol.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
C_EFCN 

Pysical end of function.

C_AUTO 

Automatic variable.

C_EXT 

external symbol

C_STAT 

static variable

C_REG 

register variable

C_EXTDEF 

external definition

C_LABEL 

label

C_ULABEL 

undefined label

C_MOS 

member of structure

C_ARG 

function argument

C_STRTAG 

structure tag

C_MOU 

member of union

C_UNTAG 

union tag

C_TPDEF 

type definition

C_USTATIC 

uninitialized static

C_ENTAG 

enumeration tag

C_MOE 

member of enumeration

C_REGPARM 

register parameter

C_FIELD 

bit field

C_BLOCK 

begin/end block

C_FCN 

begin/end function

C_EOS 

end of structure

C_FILE 

file name

C_ALIAS 

duplicated tag

C_HIDDEN 

static but avoids name conflict

C_SHADOW 

shadow symbol

C_WEAKEXT 

external with weak linkage

◆ anonymous enum

anonymous enum
Enumerator
N_DEBUG 

Debugging symbol.

N_ABS 

Absolute symbol.

N_UNDEF 

Undefined external symbol.

◆ anonymous enum

anonymous enum
Enumerator
T_ARG 

Function argument.

T_CHAR 

Character (C type char)

T_SHORT 

Short integer (C type short)

T_INT 

Integer (C type int)

T_LONG 

Long integer (C type long)

T_FLOAT 

Float (C type float)

T_DOUBLE 

Double (C type double)

T_STRUCT 

Structure (C keyword struct)

T_UNION 

Union (C keyword union)

T_ENUM 

Enumeration (C keyword enum)

T_MOE 

Member of enumeration.

T_UCHAR 

Unsigned character (C type unsigned char)

T_USHORT 

Unsigned short integer (C type unsigned short)

T_UINT 

Unsigned integer (C type unsigned int)

T_ULONG 

Unsigned long integer (C type unsigned long)

◆ anonymous enum

anonymous enum
Enumerator
DT_NON 

Not a derived type.

DT_PTR 

Pointer to.

DT_FCN 

Function returning.

DT_ARY 

Array of.

Member Data Documentation

◆ storage_class

uint8_t COFF::COFFFormat::Symbol::storage_class

COFF name: n_sclass, typical values are 2 (C_EXT), 3 (C_STAT)

The fields storage_class, section_number and value interact in non-obvious ways


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