RetroLinker
Linker for several 8-bit, 16-bit and 32-bit formats
|
Represents a symbol definition. More...
#include <symbol_definition.h>
Public Types | |
enum | binding_type { Undefined , Local , Global , Weak , Common , LocalCommon } |
Public Member Functions | |
bool | operator== (const SymbolDefinition &other) const |
bool | IsLocal () const |
bool | IsCommon () const |
bool | IsAllocated () const |
bool | Displace (const Displacement &displacement) |
Recalculates the location after a section has moved. | |
Static Public Member Functions | |
static SymbolDefinition | CreateUndefined (std::string name, offset_t size=0, offset_t align=1) |
static SymbolDefinition | CreateLocal (std::string name, Location location, offset_t size=0, offset_t align=1) |
static SymbolDefinition | CreateGlobal (std::string name, Location location, offset_t size=0, offset_t align=1) |
static SymbolDefinition | CreateWeak (std::string name, Location location, offset_t size=0, offset_t align=1) |
static SymbolDefinition | CreateCommon (std::string name, std::string section, offset_t size=0, offset_t align=1) |
static SymbolDefinition | CreateCommon (std::string name, std::string section, offset_t size, offset_t align, std::string alternative_section) |
static SymbolDefinition | CreateCommon (std::string name, std::string section, std::string alternative_section) |
static SymbolDefinition | CreateLocalCommon (std::string name, std::string section, offset_t size=0, offset_t align=1) |
static SymbolDefinition | CreateLocalCommon (std::string name, std::string section, offset_t size, offset_t align, std::string alternative_section) |
static SymbolDefinition | CreateLocalCommon (std::string name, std::string section, std::string alternative_section) |
Public Attributes | |
std::string | name |
binding_type | binding = Undefined |
Location | location |
offset_t | size = 0 |
offset_t | align = 1 |
std::string | section_name |
std::string | alternative_section_name |
Protected Member Functions | |
SymbolDefinition (std::string name, binding_type binding, Location location, offset_t size, offset_t align, std::string section_name="", std::string alternative_section_name="") | |
Represents a symbol definition.
bool SymbolDefinition::Displace | ( | const Displacement & | displacement | ) |
Recalculates the location after a section has moved.
Note that only local, global and weak symbol definitions have a location
displacement | A map from sections to locations, specifying the new starting place of the section. This can also indicate when a section has been appended to another one, and the location will be updated to reference the new section. |