예제 #1
0
void SymbolTable::addLabels(const std::vector<LabelDefinition>& labels)
{
    int lastSection = 0;
    for (const LabelDefinition& def: labels)
    {
        Label* label = getLabel(def.name,(unsigned int)Global.FileInfo.FileNum,Global.Section);

        if (isLocalSymbol(def.name) == false)
            Global.Section++;

        label->setDefined(true);
        label->setValue(def.value);
    }
}
예제 #2
0
void SymbolTable::addLabels(const std::vector<LabelDefinition>& labels)
{
	for (const LabelDefinition& def: labels)
	{
		if (!isValidSymbolName(def.name))
			continue;

		std::shared_ptr<Label> label = getLabel(def.name,Global.FileInfo.FileNum,Global.Section);
		if (label == nullptr)
			continue;

		if (isLocalSymbol(def.name) == false)
			Global.Section++;

		label->setDefined(true);
		label->setValue(def.value);
	}
}