diff options
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 2 | ||||
| -rw-r--r-- | lld/ELF/LinkerScript.h | 2 | ||||
| -rw-r--r-- | lld/ELF/ScriptParser.cpp | 2 | ||||
| -rw-r--r-- | lld/ELF/Writer.cpp | 12 |
4 files changed, 9 insertions, 9 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 1831c1603cb..29a11e392e0 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -763,7 +763,7 @@ void LinkerScript::allocateHeaders(std::vector<PhdrEntry *> &Phdrs) { uint64_t HeaderSize = getHeaderSize(); // When linker script with SECTIONS is being used, don't output headers // unless there's a space for them. - uint64_t Base = HasSections ? alignDown(Min, Config->MaxPageSize) : 0; + uint64_t Base = HasSectionsCommand ? alignDown(Min, Config->MaxPageSize) : 0; if (HeaderSize <= Min - Base || Script->hasPhdrsCommands()) { Min = alignDown(Min - HeaderSize, Config->MaxPageSize); Out::ElfHeader->Addr = Min; diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h index 145cb31fbff..5cf86653ade 100644 --- a/lld/ELF/LinkerScript.h +++ b/lld/ELF/LinkerScript.h @@ -251,7 +251,7 @@ public: // PHDRS command list. std::vector<PhdrsCommand> PhdrsCommands; - bool HasSections = false; + bool HasSectionsCommand = false; // List of section patterns specified with KEEP commands. They will // be kept even if they are unused and --gc-sections is specified. diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp index 944e29fbbc4..1c2e9d318a6 100644 --- a/lld/ELF/ScriptParser.cpp +++ b/lld/ELF/ScriptParser.cpp @@ -434,7 +434,7 @@ void ScriptParser::readSearchDir() { } void ScriptParser::readSections() { - Script->HasSections = true; + Script->HasSectionsCommand = true; // -no-rosegment is used to avoid placing read only non-executable sections in // their own segment. We do the same if SECTIONS command is present in linker diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index cdc2c0e5395..283d06499ac 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -161,7 +161,7 @@ template <class ELFT> void Writer<ELFT>::run() { addReservedSymbols(); // Create output sections. - if (Script->HasSections) { + if (Script->HasSectionsCommand) { // If linker script contains SECTIONS commands, let it create sections. Script->processCommands(Factory); @@ -813,7 +813,7 @@ template <class ELFT> void Writer<ELFT>::addReservedSymbols() { addOptionalRegular<ELFT>(Name, Out::ElfHeader, 0, STV_HIDDEN); // If linker script do layout we do not need to create any standart symbols. - if (Script->HasSections) + if (Script->HasSectionsCommand) return; auto Add = [](StringRef S, int64_t Pos) { @@ -1055,7 +1055,7 @@ template <class ELFT> void Writer<ELFT>::sortSections() { if (auto *Sec = dyn_cast<OutputSection>(Base)) Sec->SortRank = getSectionRank(Sec); - if (!Script->HasSections) { + if (!Script->HasSectionsCommand) { // We know that all the OutputSections are contiguous in // this case. auto E = Script->Commands.end(); @@ -1355,7 +1355,7 @@ template <class ELFT> void Writer<ELFT>::finalizeSections() { InX::Dynamic}, [](SyntheticSection *SS) { SS->finalizeContents(); }); - if (!Script->HasSections && !Config->Relocatable) + if (!Script->HasSectionsCommand && !Config->Relocatable) fixSectionAlignments(); // Some architectures use small displacements for jump instructions. @@ -1681,7 +1681,7 @@ template <class ELFT> void Writer<ELFT>::assignFileOffsets() { for (OutputSection *Sec : OutputSections) { Off = setOffset(Sec, Off); - if (Script->HasSections) + if (Script->HasSectionsCommand) continue; // If this is a last section of the last executable segment and that // segment is the last loadable segment, align the offset of the @@ -1860,7 +1860,7 @@ static void fillTrap(uint8_t *I, uint8_t *End) { // We'll leave other pages in segments as-is because the rest will be // overwritten by output sections. template <class ELFT> void Writer<ELFT>::writeTrapInstr() { - if (Script->HasSections) + if (Script->HasSectionsCommand) return; // Fill the last page. |

