diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-05-29 16:26:20 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-05-29 16:26:20 +0000 |
commit | bef2946c219dc621608bcc9e47f8b973e5ef5c70 (patch) | |
tree | 1e4dfae199fc27167ed7496693938fec2dab65c2 /ELF/LinkerScript.h | |
parent | c53addf38e24e4dafe992aafb3ae928bfa8fdb0a (diff) |
Notes
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 d0a4d83d72b0..e56e569d4e72 100644 --- a/ELF/LinkerScript.h +++ b/ELF/LinkerScript.h @@ -130,6 +130,9 @@ struct OutputSectionCommand : BaseCommand { ConstraintKind Constraint = ConstraintKind::NoConstraint; std::string Location; std::string MemoryRegionName; + + template <class ELFT> void writeTo(uint8_t *Buf); + uint32_t getFiller(); }; // This struct represents one section match pattern in SECTIONS() command. @@ -157,7 +160,7 @@ struct InputSectionDescription : BaseCommand { // will be associated with this InputSectionDescription. std::vector<SectionPattern> SectionPatterns; - std::vector<InputSectionBase *> Sections; + std::vector<InputSection *> Sections; }; // Represents an ASSERT(). @@ -213,11 +216,10 @@ struct ScriptConfiguration { 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); - std::vector<InputSectionBase *> + std::vector<InputSection *> computeInputSections(const InputSectionDescription *); std::vector<InputSectionBase *> @@ -244,6 +246,7 @@ class LinkerScript final { MemoryRegion *CurMemRegion = nullptr; public: + OutputSectionCommand *getCmd(OutputSection *Sec) const; bool hasPhdrsCommands() { return !Opt.PhdrsCommands.empty(); } uint64_t getDot() { return Dot; } OutputSection *getOutputSection(const Twine &Loc, StringRef S); @@ -263,7 +266,6 @@ public: std::vector<PhdrEntry> createPhdrs(); bool ignoreInterpSection(); - llvm::Optional<uint32_t> getFiller(OutputSection *Sec); bool hasLMA(OutputSection *Sec); bool shouldKeep(InputSectionBase *S); void assignOffsets(OutputSectionCommand *Cmd); @@ -272,7 +274,6 @@ public: void synchronize(); void assignAddresses(std::vector<PhdrEntry> &Phdrs); - void writeDataBytes(OutputSection *Sec, uint8_t *Buf); void addSymbol(SymbolAssignment *Cmd); void processCommands(OutputSectionFactory &Factory); |