summaryrefslogtreecommitdiff
path: root/ELF/SyntheticSections.h
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/SyntheticSections.h')
-rw-r--r--ELF/SyntheticSections.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/ELF/SyntheticSections.h b/ELF/SyntheticSections.h
index f7e891ec3a66..df67e079ad0e 100644
--- a/ELF/SyntheticSections.h
+++ b/ELF/SyntheticSections.h
@@ -366,23 +366,26 @@ public:
void finalize() override;
void writeTo(uint8_t *Buf) override;
size_t getSize() const override { return getNumSymbols() * sizeof(Elf_Sym); }
- void addSymbol(SymbolBody *Body);
+ void addGlobal(SymbolBody *Body);
+ void addLocal(SymbolBody *Body);
StringTableSection<ELFT> &getStrTabSec() const { return StrTabSec; }
- unsigned getNumSymbols() const { return NumLocals + Symbols.size() + 1; }
+ unsigned getNumSymbols() const { return Symbols.size() + 1; }
+ size_t getSymbolIndex(SymbolBody *Body);
ArrayRef<SymbolTableEntry> getSymbols() const { return Symbols; }
static const OutputSectionBase *getOutputSection(SymbolBody *Sym);
- unsigned NumLocals = 0;
- StringTableSection<ELFT> &StrTabSec;
-
private:
void writeLocalSymbols(uint8_t *&Buf);
void writeGlobalSymbols(uint8_t *Buf);
// A vector of symbols and their string table offsets.
std::vector<SymbolTableEntry> Symbols;
+
+ StringTableSection<ELFT> &StrTabSec;
+
+ unsigned NumLocals = 0;
};
// Outputs GNU Hash section. For detailed explanation see: