diff options
author | Ian Lance Taylor <iant@google.com> | 2006-09-27 22:53:42 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2006-09-27 22:53:42 +0000 |
commit | 75f65a3e309b8cd885c782f6af106d1e2a1876f6 (patch) | |
tree | 0f21c32a5e40156d007fd6a676b5d74a8c423c90 /gold/symtab.h | |
parent | 6b89cc2108a525fdc4186bae5365acc258e9c23c (diff) | |
download | gdb-75f65a3e309b8cd885c782f6af106d1e2a1876f6.zip gdb-75f65a3e309b8cd885c782f6af106d1e2a1876f6.tar.gz gdb-75f65a3e309b8cd885c782f6af106d1e2a1876f6.tar.bz2 |
Finished layout code.
Diffstat (limited to 'gold/symtab.h')
-rw-r--r-- | gold/symtab.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/gold/symtab.h b/gold/symtab.h index 09aff03..91a1f4d 100644 --- a/gold/symtab.h +++ b/gold/symtab.h @@ -182,6 +182,12 @@ class Sized_symbol : public Symbol symsize() const { return this->size_; } + // Set the symbol value. This is called when we store the final + // values of the symbols into the symbol table. + void + set_value(Value_type value) + { this->value_ = value; } + private: Sized_symbol(const Sized_symbol&); Sized_symbol& operator=(const Sized_symbol&); @@ -230,13 +236,12 @@ class Symbol_table const Sized_symbol<size>* get_sized_symbol(const Symbol*) const; - // Record the names of the local symbols for an object. - template<int size, bool big_endian> - void - add_local_symbol_names(Sized_object<size, big_endian>* object, - const elfcpp::Sym<size, big_endian>* syms, - size_t count, const char* sym_names, - size_t sym_name_size); + // Finalize the symbol table after we have set the final addresses + // of all the input sections. This sets the final symbol values and + // adds the names to *POOL. It records the file offset OFF, and + // returns the new file offset. + off_t + finalize(off_t, Stringpool*); private: Symbol_table(const Symbol_table&); @@ -276,6 +281,11 @@ class Symbol_table bool big_endian); #endif + // Finalize symbols specialized for size. + template<int size> + off_t + sized_finalize(off_t, Stringpool*); + // The type of the symbol hash table. typedef std::pair<const char*, const char*> Symbol_table_key; @@ -298,6 +308,10 @@ class Symbol_table // The size of the symbols in the symbol table (32 or 64). int size_; + // The file offset within the output symtab section where we should + // write the table. + off_t offset_; + // The symbol hash table. Symbol_table_type table_; @@ -305,11 +319,6 @@ class Symbol_table // Entries in the hash table point into this pool. Stringpool namepool_; - // A pool of symbol names to go into the output file. This is used - // for all symbols, global and local, but only the names of symbols - // which will definitely be output are added to this pool. - Stringpool output_pool_; - // Forwarding symbols. Unordered_map<Symbol*, Symbol*> forwarders_; }; |