} else if (Tok == "VERSION") {
readVersion();
} else if (SymbolAssignment *Cmd = readProvideOrAssignment(Tok, true)) {
- if (Opt.HasContents)
+ if (Opt.HasSections)
Opt.Commands.emplace_back(Cmd);
else
Opt.Assignments.emplace_back(Cmd);
}
void ScriptParser::readSections() {
- Opt.HasContents = true;
+ Opt.HasSections = true;
expect("{");
while (!Error && !skip("}")) {
StringRef Tok = next();
// Used to assign sections to headers.
std::vector<PhdrsCommand> PhdrsCommands;
- bool HasContents = false;
+ bool HasSections = false;
llvm::BumpPtrAllocator Alloc;
Script<ELFT>::X->createAssignments();
Script<ELFT>::X->OutputSections = &OutputSections;
- if (ScriptConfig->HasContents)
+ if (ScriptConfig->HasSections)
Script<ELFT>::X->createSections(Factory);
else
createSections();
Phdrs = Script<ELFT>::X->hasPhdrsCommands() ? Script<ELFT>::X->createPhdrs()
: createPhdrs();
fixHeaders();
- if (ScriptConfig->HasContents) {
+ if (ScriptConfig->HasSections) {
Script<ELFT>::X->assignAddresses();
} else {
fixSectionAlignments();
Symtab<ELFT>::X->addIgnored("__tls_get_addr");
// If linker script do layout we do not need to create any standart symbols.
- if (ScriptConfig->HasContents)
+ if (ScriptConfig->HasSections)
return;
ElfSym<ELFT>::EhdrStart = Symtab<ELFT>::X->addIgnored("__ehdr_start");
// sections. These are special, we do not include them into output sections
// list, but have them to simplify the code.
template <class ELFT> void Writer<ELFT>::fixHeaders() {
- uintX_t BaseVA = ScriptConfig->HasContents ? 0 : Config->ImageBase;
+ uintX_t BaseVA = ScriptConfig->HasSections ? 0 : Config->ImageBase;
Out<ELFT>::ElfHeader->setVA(BaseVA);
uintX_t Off = Out<ELFT>::ElfHeader->getSize();
Out<ELFT>::ProgramHeaders->setVA(Off + BaseVA);