Go to the documentation of this file.
35 #ifndef TCEASM_LABEL_MANAGER_HH
36 #define TCEASM_LABEL_MANAGER_HH
76 std::string
aSpaceName(std::string& labelName);
148 typedef std::map<std::string, InternalLabel*>
SymbolMap;
TPEF::SymbolElement * createSymbolWithReference(InternalLabel *currLabel, TPEF::Section *ownerSection)
TPEF::Binary & bin_
For finding sections containing relocated elements.
void commitLastRelocations()
UValue value(std::string &name)
MachineResourceManager & resources_
Common resources of TPEF.
void addProcedure(std::string &name, UValue value)
TPEF::Section * findSectionByAddress(InternalLabel *currLabel)
LabelManager(TPEF::Binary &bin, MachineResourceManager &resources, AssemblyParserDiagnostic *parent)
void writeProcedureSymbols(TPEF::CodeSection *codeSect, TPEF::SymbolSection *symbolSect, TPEF::StringSection *strings)
TPEF::SectionElement * location
Element that is reloacted.
std::map< std::string, InternalLabel * > SymbolMap
UValue resolveExpressionValue(UValue asmLineNumber, LiteralOrExpression &litOrExpr)
TPEF::Section * locationSect
Section where relocated immediate or chunk is stored.
void addRelocation(TPEF::Section &locationSect, TPEF::SectionElement &location, TPEF::ASpaceElement &dstASpace, UValue destination, UValue bitWidth)
TPEF::ASpaceElement * dstASpace
Address space of destination address.
TPEF::RelocSection * findOrCreateRelocationSection(InternalRelocation *currReloc, TPEF::SymbolSection *symbolSect)
UValue value
Address where label is located.
std::set< InternalRelocation * > uncommittedRelocs_
Uncommitted relocations.
std::string aSpaceName(std::string &labelName)
void addLabel(TPEF::ASpaceElement &aSpace, std::string &name, UValue value)
void setGlobal(std::string &labelName)
std::string name
Name of the label.
TPEF::Section * findRelocationDstSection(InternalRelocation *currReloc)
void removeLabel(std::string &name)
std::set< std::string > globals_
Names of global symbols.
TPEF::ASpaceElement & aSpaceElement(std::string &labelName)
TPEF::ASpaceElement * aSpace
Address space of the label.
UValue destination
Destination address.
UValue bitWidth
Number of bits that are used to store the value.
SymbolMap labels_
Contains stored symbols by their name.
std::map< std::string, UValue > procedures_
Names and addresses of procedure starts.
void clearLastRelocations()
std::set< InternalRelocation * > relocs_
Added relocations.