aboutsummaryrefslogtreecommitdiffstats
path: root/ELF/LinkerScript.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-01 20:59:20 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-01 20:59:20 +0000
commit80350c116f86dbb87e055a630b1b2be0c66b244b (patch)
tree022e6b2a1e0e5a03028fa465a30338d8f6dbbf48 /ELF/LinkerScript.h
parentcbb560c9ba3c378189c7a438bed9977b482410fb (diff)
downloadsrc-80350c116f86dbb87e055a630b1b2be0c66b244b.tar.gz
src-80350c116f86dbb87e055a630b1b2be0c66b244b.zip
Vendor import of lld trunk r304460:vendor/lld/lld-trunk-r304460
Notes
Notes: svn path=/vendor/lld/dist/; revision=319469 svn path=/vendor/lld/lld-trunk-r304460/; revision=319470; tag=vendor/lld/lld-trunk-r304460
Diffstat (limited to 'ELF/LinkerScript.h')
-rw-r--r--ELF/LinkerScript.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/ELF/LinkerScript.h b/ELF/LinkerScript.h
index 08f60f4517a7..a708ea7f61d5 100644
--- a/ELF/LinkerScript.h
+++ b/ELF/LinkerScript.h
@@ -137,6 +137,7 @@ struct OutputSectionCommand : BaseCommand {
std::string MemoryRegionName;
template <class ELFT> void writeTo(uint8_t *Buf);
+ template <class ELFT> void maybeCompress();
uint32_t getFiller();
};
@@ -221,6 +222,8 @@ struct ScriptConfiguration {
class LinkerScript final {
llvm::DenseMap<OutputSection *, OutputSectionCommand *> SecToCommand;
+ llvm::DenseMap<StringRef, OutputSectionCommand *> NameToOutputSectionCommand;
+
void assignSymbol(SymbolAssignment *Cmd, bool InSec);
void setDot(Expr E, const Twine &Loc, bool InSec);
@@ -241,7 +244,6 @@ class LinkerScript final {
void process(BaseCommand &Base);
OutputSection *Aether;
- bool ErrorOnMissingSection = false;
uint64_t Dot;
uint64_t ThreadBssOffset = 0;
@@ -251,11 +253,14 @@ class LinkerScript final {
MemoryRegion *CurMemRegion = nullptr;
public:
+ bool ErrorOnMissingSection = false;
+ OutputSectionCommand *createOutputSectionCommand(StringRef Name,
+ StringRef Location);
+ OutputSectionCommand *getOrCreateOutputSectionCommand(StringRef Name);
+
OutputSectionCommand *getCmd(OutputSection *Sec) const;
bool hasPhdrsCommands() { return !Opt.PhdrsCommands.empty(); }
uint64_t getDot() { return Dot; }
- OutputSection *getOutputSection(const Twine &Loc, StringRef S);
- uint64_t getOutputSectionSize(StringRef S);
void discard(ArrayRef<InputSectionBase *> V);
ExprValue getSymbolValue(const Twine &Loc, StringRef S);
@@ -277,7 +282,8 @@ public:
void placeOrphanSections();
void processNonSectionCommands();
void synchronize();
- void assignAddresses(std::vector<PhdrEntry> &Phdrs);
+ void assignAddresses(std::vector<PhdrEntry> &Phdrs,
+ ArrayRef<OutputSectionCommand *> OutputSectionCommands);
void addSymbol(SymbolAssignment *Cmd);
void processCommands(OutputSectionFactory &Factory);