Rename processCommands -> processSectionCommands.

llvm-svn: 315415
This commit is contained in:
Rui Ueyama 2017-10-11 02:28:28 +00:00
parent a80633ca14
commit 5908c2f877
4 changed files with 8 additions and 7 deletions

View File

@ -114,8 +114,8 @@ void LinkerScript::setDot(Expr E, const Twine &Loc, bool InSec) {
CurAddressState->OutSec->Size = Dot - CurAddressState->OutSec->Addr;
}
// This function is called from processCommands, while we are
// fixing the output section layout.
// This function is called from processSectionCommands,
// while we are fixing the output section layout.
void LinkerScript::addSymbol(SymbolAssignment *Cmd) {
if (Cmd->Name == ".")
return;
@ -337,7 +337,7 @@ LinkerScript::createInputSectionList(OutputSection &OutCmd) {
return Ret;
}
void LinkerScript::processCommands(OutputSectionFactory &Factory) {
void LinkerScript::processSectionCommands(OutputSectionFactory &Factory) {
// A symbol can be assigned before any section is mentioned in the linker
// script. In an DSO, the symbol values are addresses, so the only important
// section values are:

View File

@ -186,7 +186,7 @@ struct PhdrsCommand {
};
class LinkerScript final {
// Temporary state used in processCommands() and assignAddresses()
// Temporary state used in processSectionCommands() and assignAddresses()
// that must be reinitialized for each call to the above functions, and must
// not be used outside of the scope of a call to the above functions.
struct AddressState {
@ -247,7 +247,7 @@ public:
void assignAddresses();
void allocateHeaders(std::vector<PhdrEntry *> &Phdrs);
void addSymbol(SymbolAssignment *Cmd);
void processCommands(OutputSectionFactory &Factory);
void processSectionCommands(OutputSectionFactory &Factory);
// SECTIONS command list.
std::vector<BaseCommand *> SectionCommands;

View File

@ -46,6 +46,7 @@ public:
static bool classof(const SectionBase *S) {
return S->kind() == SectionBase::Output;
}
static bool classof(const BaseCommand *C);
uint64_t getLMA() const { return Addr + LMAOffset; }

View File

@ -163,7 +163,7 @@ template <class ELFT> void Writer<ELFT>::run() {
// Create output sections.
if (Script->HasSectionsCommand) {
// If linker script contains SECTIONS commands, let it create sections.
Script->processCommands(Factory);
Script->processSectionCommands(Factory);
// Linker scripts may have left some input sections unassigned.
// Assign such sections using the default rule.
@ -173,7 +173,7 @@ template <class ELFT> void Writer<ELFT>::run() {
// output sections by default rules. We still need to give the
// linker script a chance to run, because it might contain
// non-SECTIONS commands such as ASSERT.
Script->processCommands(Factory);
Script->processSectionCommands(Factory);
createSections();
}