diff options
author | Ian Lance Taylor <iant@google.com> | 2007-12-14 05:24:17 +0000 |
---|---|---|
committer | Ian Lance Taylor <iant@google.com> | 2007-12-14 05:24:17 +0000 |
commit | 6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55 (patch) | |
tree | aa539a8dc67b986680175065607f9f51c471b831 /gold/object.h | |
parent | 460c00b558bc0cf4501c514b0ff13c7d48750165 (diff) | |
download | gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.zip gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.tar.gz gdb-6d01333390a0047a4e8ec0d69f4d1c8f43c3fc55.tar.bz2 |
From Craig Silverstein: size hash tables to avoid resizing.
Diffstat (limited to 'gold/object.h')
-rw-r--r-- | gold/object.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/gold/object.h b/gold/object.h index 5faa911..a98e756 100644 --- a/gold/object.h +++ b/gold/object.h @@ -429,6 +429,11 @@ class Relobj : public Object Layout* layout, Read_relocs_data* rd) { return this->do_scan_relocs(options, symtab, layout, rd); } + // The number of local symbols in the input symbol table. + virtual unsigned int + local_symbol_count() const + { return this->do_local_symbol_count(); } + // Initial local symbol processing: count the number of local symbols // in the output symbol table and dynamic symbol table; add local symbol // names to *POOL and *DYNPOOL. @@ -538,6 +543,10 @@ class Relobj : public Object do_scan_relocs(const General_options&, Symbol_table*, Layout*, Read_relocs_data*) = 0; + // Return the number of local symbols--implemented by child class. + virtual unsigned int + do_local_symbol_count() const = 0; + // Count local symbols--implemented by child class. virtual void do_count_local_symbols(Stringpool_template<char>*, @@ -791,11 +800,6 @@ class Sized_relobj : public Relobj void setup(const typename elfcpp::Ehdr<size, big_endian>&); - // Return the number of local symbols. - unsigned int - local_symbol_count() const - { return this->local_symbol_count_; } - // If SYM is the index of a global symbol in the object file's // symbol table, return the Symbol object. Otherwise, return NULL. Symbol* @@ -964,10 +968,16 @@ class Sized_relobj : public Relobj get_symbol_location_info(unsigned int shndx, off_t offset, Symbol_location_info* info); + protected: // Read the symbols. void do_read_symbols(Read_symbols_data*); + // Return the number of local symbols. + unsigned int + do_local_symbol_count() const + { return this->local_symbol_count_; } + // Lay out the input sections. void do_layout(Symbol_table*, Layout*, Read_symbols_data*); |