diff options
Diffstat (limited to 'ELF/LinkerScript.h')
-rw-r--r-- | ELF/LinkerScript.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ELF/LinkerScript.h b/ELF/LinkerScript.h index 7bcd21c87602..d0a4d83d72b0 100644 --- a/ELF/LinkerScript.h +++ b/ELF/LinkerScript.h @@ -211,8 +211,9 @@ struct ScriptConfiguration { std::vector<llvm::StringRef> ReferencedSymbols; }; -class LinkerScript { -protected: +class LinkerScript final { + llvm::DenseMap<OutputSection *, OutputSectionCommand *> SecToCommand; + OutputSectionCommand *getCmd(OutputSection *Sec) const; void assignSymbol(SymbolAssignment *Cmd, bool InSec); void setDot(Expr E, const Twine &Loc, bool InSec); @@ -222,7 +223,7 @@ protected: std::vector<InputSectionBase *> createInputSectionList(OutputSectionCommand &Cmd); - std::vector<size_t> getPhdrIndices(StringRef SectionName); + std::vector<size_t> getPhdrIndices(OutputSection *Sec); size_t getPhdrIndex(const Twine &Loc, StringRef PhdrName); MemoryRegion *findMemoryRegion(OutputSectionCommand *Cmd); @@ -262,8 +263,8 @@ public: std::vector<PhdrEntry> createPhdrs(); bool ignoreInterpSection(); - llvm::Optional<uint32_t> getFiller(StringRef Name); - bool hasLMA(StringRef Name); + llvm::Optional<uint32_t> getFiller(OutputSection *Sec); + bool hasLMA(OutputSection *Sec); bool shouldKeep(InputSectionBase *S); void assignOffsets(OutputSectionCommand *Cmd); void placeOrphanSections(); |