diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-02-01 21:35:17 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-02-01 21:35:17 +0000 |
commit | 63b9abd1dbe002d940a818f51dd9d6e585e41c84 (patch) | |
tree | 8f257c7b94b6320186de5cc06685fbc0b7e0a93f /ELF/SyntheticSections.h | |
parent | b025d011dd270230aeb50d7174a2a05616fe81eb (diff) | |
download | src-test2-9cd08cc61848c08ffe5d59a96e57bf23e162ec5a.tar.gz src-test2-9cd08cc61848c08ffe5d59a96e57bf23e162ec5a.zip |
Diffstat (limited to 'ELF/SyntheticSections.h')
-rw-r--r-- | ELF/SyntheticSections.h | 13 |
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: |