1 // symtab.h -- the gold symbol table -*- C++ -*-
12 #include "targetsize.h"
14 #include "workqueue.h"
22 // An entry in the symbol table. The symbol table can have a lot of
23 // entries, so we don't want this class to get too big.
29 typedef typename elfcpp::Elf_types<size>::Elf_Addr Value;
30 typedef typename Size_types<size>::Unsigned_type Size;
33 // Every symbol has a unique name, more or less, so we use
34 // std::string for the name. There are only a few versions in a
35 // given link, so for them we point into a pool.
42 elfcpp::STT type_ : 4;
43 elfcpp::STB binding_ : 4;
44 elfcpp:STV visibility_ : 2;
45 unsigned int other_ : 6;
48 // The main linker symbol table.
56 // Return a pointer to a symbol specified by name.
58 lookup(const std::string& name) const;
60 // Return a pointer to a symbol specified by name plus version.
62 lookup(const std::string& name, const char* version) const;
66 { return this->token_; }
69 Symbol_table(const Symbol_table&);
70 Symbol_table& operator=(const Symbol_table&);
72 typedef std::pair<std::string, std::string> Symbol_table_key;
74 Unordered_map<Symbol_table_key, Symbol<size>*> table_;
78 } // End namespace gold.
80 #endif // !defined(GOLD_SYMTAB_H)