File_read::print_stats();
fprintf(stderr, _("%s: output file size: %lld bytes\n"),
program_name, static_cast<long long>(layout.output_file_size()));
+ symtab.print_stats();
}
gold_exit(errors.error_count() == 0);
of->write_output_view(offset, sym_size, pov);
}
+// Print statistical information to stderr. This is used for --stats.
+
+void
+Symbol_table::print_stats() const
+{
+#if defined(HAVE_TR1_UNORDERED_MAP) || defined(HAVE_EXT_HASH_MAP)
+ fprintf(stderr, _("%s: symbol table entries: %zu; buckets: %zu\n"),
+ program_name, this->table_.size(), this->table_.bucket_count());
+#else
+ fprintf(stderr, _("%s: symbol table entries: %zu\n"),
+ program_name, this->table_.size());
+#endif
+}
+
// We check for ODR violations by looking for symbols with the same
// name for which the debugging information reports that they were
// defined in different source locations. When comparing the source
void
write_section_symbol(const Output_section*, Output_file*, off_t) const;
+ // Dump statistical information to stderr.
+ void
+ print_stats() const;
+
private:
Symbol_table(const Symbol_table&);
Symbol_table& operator=(const Symbol_table&);