aboutsummaryrefslogtreecommitdiffstats
path: root/ELF/LinkerScript.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-16 19:47:41 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-16 19:47:41 +0000
commit022ebf5bbf58ca2dd943d3376cc95a6b206db799 (patch)
tree4069ef3b75eed2d68683cb6224a627c24cd95b15 /ELF/LinkerScript.h
parentfbe69f787ace06f44b6cb1bd3cd45ac703a16a05 (diff)
downloadsrc-022ebf5bbf58ca2dd943d3376cc95a6b206db799.tar.gz
src-022ebf5bbf58ca2dd943d3376cc95a6b206db799.zip
Vendor import of lld trunk r303197:vendor/lld/lld-trunk-r303197
Notes
Notes: svn path=/vendor/lld/dist/; revision=318376 svn path=/vendor/lld/lld-trunk-r303197/; revision=318377; tag=vendor/lld/lld-trunk-r303197
Diffstat (limited to 'ELF/LinkerScript.h')
-rw-r--r--ELF/LinkerScript.h11
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();