aboutsummaryrefslogtreecommitdiffstats
path: root/ELF/SyntheticSections.h
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/SyntheticSections.h')
-rw-r--r--ELF/SyntheticSections.h24
1 files changed, 7 insertions, 17 deletions
diff --git a/ELF/SyntheticSections.h b/ELF/SyntheticSections.h
index 1c4dd06e0277..d592dcb84e12 100644
--- a/ELF/SyntheticSections.h
+++ b/ELF/SyntheticSections.h
@@ -76,7 +76,7 @@ public:
return SyntheticSection::classof(d) && d->name == ".eh_frame";
}
- template <class ELFT> void addSection(InputSectionBase *s);
+ void addSection(EhInputSection *sec);
std::vector<EhInputSection *> sections;
size_t numFdes = 0;
@@ -97,7 +97,9 @@ private:
uint64_t size = 0;
template <class ELFT, class RelTy>
- void addSectionAux(EhInputSection *s, llvm::ArrayRef<RelTy> rels);
+ void addRecords(EhInputSection *s, llvm::ArrayRef<RelTy> rels);
+ template <class ELFT>
+ void addSectionAux(EhInputSection *s);
template <class ELFT, class RelTy>
CieRecord *addCie(EhSectionPiece &piece, ArrayRef<RelTy> rels);
@@ -992,7 +994,7 @@ public:
size_t getSize() const override { return size; }
void writeTo(uint8_t *buf) override;
- bool isNeeded() const override { return !empty; }
+ bool isNeeded() const override;
// Sort and remove duplicate entries.
void finalizeContents() override;
InputSection *getLinkOrderDep() const;
@@ -1006,9 +1008,6 @@ public:
private:
size_t size;
- // Empty if ExecutableSections contains no dependent .ARM.exidx sections.
- bool empty = true;
-
// Instead of storing pointers to the .ARM.exidx InputSections from
// InputObjects, we store pointers to the executable sections that need
// .ARM.exidx sections. We can then use the dependentSections of these to
@@ -1098,19 +1097,11 @@ public:
void writeTo(uint8_t *buf) override;
};
-// Create a dummy .sdata for __global_pointer$ if .sdata does not exist.
-class RISCVSdataSection final : public SyntheticSection {
-public:
- RISCVSdataSection();
- size_t getSize() const override { return 0; }
- bool isNeeded() const override;
- void writeTo(uint8_t *buf) override {}
-};
-
InputSection *createInterpSection();
MergeInputSection *createCommentSection();
+MergeSyntheticSection *createMergeSynthetic(StringRef name, uint32_t type,
+ uint64_t flags, uint32_t alignment);
template <class ELFT> void splitSections();
-void mergeSections();
template <typename ELFT> void writeEhdr(uint8_t *buf, Partition &part);
template <typename ELFT> void writePhdrs(uint8_t *buf, Partition &part);
@@ -1171,7 +1162,6 @@ struct InStruct {
PltSection *plt;
PltSection *iplt;
PPC32Got2Section *ppc32Got2;
- RISCVSdataSection *riscvSdata;
RelocationBaseSection *relaPlt;
RelocationBaseSection *relaIplt;
StringTableSection *shStrTab;