Lines Matching defs:cmd

84   bool readSectionDirective(OutputSection *cmd, StringRef tok);
85 void readSectionAddressType(OutputSection *cmd);
281 } else if (SymbolAssignment *cmd = readAssignment(tok)) {
282 ctx.script->sectionCommands.push_back(cmd);
298 auto *cmd = make<SymbolAssignment>(
300 ctx.script->sectionCommands.push_back(cmd);
305 NoCrossRefCommand cmd{{}, to};
307 cmd.outputSections.push_back(unquote(tok));
308 if (cmd.outputSections.size() < 2)
312 ctx.script->noCrossRefs.push_back(std::move(cmd));
515 PhdrsCommand cmd;
516 cmd.name = tok;
517 cmd.type = readPhdrType();
521 cmd.hasFilehdr = true;
523 cmd.hasPhdrs = true;
525 cmd.lmaExpr = readParenExpr();
527 cmd.flags = readParenExpr()().getValue();
532 ctx.script->phdrsCommands.push_back(cmd);
602 for (SectionCommand *cmd : v)
603 max = std::max(max, cast<OutputDesc>(cmd)->osec.size);
649 for (SectionCommand *cmd : readOverlay())
650 v.push_back(cmd);
662 if (SectionCommand *cmd = readAssignment(tok))
663 v.push_back(cmd);
671 for (SectionCommand *cmd : v)
672 if (auto *osd = dyn_cast<OutputDesc>(cmd))
690 for (SectionCommand *cmd : v)
691 if (auto *os = dyn_cast<OutputDesc>(cmd))
816 auto *cmd =
844 std::move(v.begin(), v.end(), std::back_inserter(cmd->sectionPatterns));
847 return cmd;
862 InputSectionDescription *cmd;
864 cmd = make<InputSectionDescription>(StringRef{}, withFlags, withoutFlags,
867 cmd = readInputSectionRules(tok, withFlags, withoutFlags);
869 ctx.script->keptSections.push_back(cmd);
870 return cmd;
913 bool ScriptParser::readSectionDirective(OutputSection *cmd, StringRef tok) {
919 cmd->type = SHT_NOBITS;
920 cmd->typeIsSet = true;
927 cmd->type = it->second;
933 cmd->type = readExpr()().getValue();
935 cmd->typeIsSet = true;
938 cmd->nonAlloc = true;
955 void ScriptParser::readSectionAddressType(OutputSection *cmd) {
959 if (readSectionDirective(cmd, peek()))
961 cmd->addrExpr = readExpr();
964 cmd->addrExpr = readExpr();
970 if (!readSectionDirective(cmd, tok))
1010 OutputDesc *cmd =
1012 OutputSection *osec = &cmd->osec;
1101 return cmd;
1137 SymbolAssignment *cmd = readSymbolAssignment(name);
1138 cmd->provide = provide;
1139 cmd->hidden = hidden;
1141 return cmd;
1161 SymbolAssignment *cmd = nullptr;
1168 cmd = readSymbolAssignment(unquote(tok));
1171 cmd = readSymbolAssignment(unquote(tok));
1173 cmd = readProvideHidden(true, false);
1175 cmd = readProvideHidden(false, true);
1177 cmd = readProvideHidden(true, true);
1181 if (cmd) {
1182 cmd->dataSegmentRelroEnd = !savedSeenRelroEnd && ctx.script->seenRelroEnd;
1183 cmd->commandString = StringRef(oldS, curTok.data() - oldS).str();
1184 squeezeSpaces(cmd->commandString);
1187 return cmd;
1644 OutputSection *cmd = &ctx.script->getOrCreateOutputSection(name)->osec;
1648 return [=] { return cmd->size; };