diff options
Diffstat (limited to 'lld/lib')
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Layout.h | 13 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/SectionChunks.h | 4 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/SegmentChunks.h | 5 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/TargetHandler.h | 2 | ||||
| -rw-r--r-- | lld/lib/ReaderWriter/ELF/Writer.h | 3 |
5 files changed, 8 insertions, 19 deletions
diff --git a/lld/lib/ReaderWriter/ELF/Layout.h b/lld/lib/ReaderWriter/ELF/Layout.h index 826cf5035d5..83914335dd0 100644 --- a/lld/lib/ReaderWriter/ELF/Layout.h +++ b/lld/lib/ReaderWriter/ELF/Layout.h @@ -33,26 +33,27 @@ public: typedef uint32_t SegmentType; typedef uint32_t Flags; -public: + virtual ~Layout() {} + /// Return the order the section would appear in the output file virtual SectionOrder getSectionOrder(StringRef name, int32_t contentType, int32_t contentPerm) = 0; + /// \brief Append the Atom to the layout and create appropriate sections. /// \returns A reference to the atom layout or an error. The atom layout will /// be updated as linking progresses. virtual ErrorOr<const lld::AtomLayout *> addAtom(const Atom *atom) = 0; + /// find the Atom in the current layout virtual const AtomLayout *findAtomLayoutByName(StringRef name) const = 0; + /// associates a section to a segment virtual void assignSectionsToSegments() = 0; + /// associates a virtual address to the segment, section, and the atom virtual void assignVirtualAddress() = 0; - -public: - Layout() {} - - virtual ~Layout() { } }; + } // end namespace elf } // end namespace lld diff --git a/lld/lib/ReaderWriter/ELF/SectionChunks.h b/lld/lib/ReaderWriter/ELF/SectionChunks.h index d9176837847..03ccfa059c6 100644 --- a/lld/lib/ReaderWriter/ELF/SectionChunks.h +++ b/lld/lib/ReaderWriter/ELF/SectionChunks.h @@ -53,9 +53,7 @@ public: /// \brief Finalize the section contents before writing /// \brief Does this section have an output segment. - virtual bool hasOutputSegment() { - return false; - } + virtual bool hasOutputSegment() { return false; } /// Return if the section is a loadable section that occupies memory virtual bool isLoadableSection() const { return false; } diff --git a/lld/lib/ReaderWriter/ELF/SegmentChunks.h b/lld/lib/ReaderWriter/ELF/SegmentChunks.h index 0788f7ee5d4..4f8e8f1aaf7 100644 --- a/lld/lib/ReaderWriter/ELF/SegmentChunks.h +++ b/lld/lib/ReaderWriter/ELF/SegmentChunks.h @@ -38,8 +38,6 @@ class SegmentSlice { public: typedef typename std::vector<Chunk<ELFT> *>::iterator SectionIter; - SegmentSlice() { } - /// Set the start of the slice. void setStart(int32_t s) { _startSection = s; } @@ -49,12 +47,10 @@ public: // Return the fileOffset of the slice uint64_t fileOffset() const { return _offset; } - void setFileOffset(uint64_t offset) { _offset = offset; } // Return the size of the slice uint64_t fileSize() const { return _fsize; } - void setFileSize(uint64_t filesz) { _fsize = filesz; } // Return the start of the slice @@ -313,7 +309,6 @@ public: this->_fsize = this->_sections.back()->fileSize(); this->_msize = this->_sections.back()->memSize(); } - }; template <class ELFT> diff --git a/lld/lib/ReaderWriter/ELF/TargetHandler.h b/lld/lib/ReaderWriter/ELF/TargetHandler.h index ca7a442276d..d21b1573400 100644 --- a/lld/lib/ReaderWriter/ELF/TargetHandler.h +++ b/lld/lib/ReaderWriter/ELF/TargetHandler.h @@ -42,8 +42,6 @@ template <class ELFT> class TargetLayout; class TargetRelocationHandler { public: - /// Constructor - TargetRelocationHandler() {} virtual ~TargetRelocationHandler() {} virtual std::error_code applyRelocation(ELFWriter &, llvm::FileOutputBuffer &, diff --git a/lld/lib/ReaderWriter/ELF/Writer.h b/lld/lib/ReaderWriter/ELF/Writer.h index e113953c84b..de354f83838 100644 --- a/lld/lib/ReaderWriter/ELF/Writer.h +++ b/lld/lib/ReaderWriter/ELF/Writer.h @@ -19,9 +19,6 @@ namespace elf { /// various kinds of ELF files. class ELFWriter : public Writer { public: - ELFWriter() {} - -public: /// \brief builds the chunks that needs to be written to the output /// ELF file virtual void buildChunks(const File &file) = 0; |

