diff options
author | Cary Coutant <ccoutant@google.com> | 2008-08-07 17:02:11 +0000 |
---|---|---|
committer | Cary Coutant <ccoutant@google.com> | 2008-08-07 17:02:11 +0000 |
commit | ac45a351cf89f2a832a04052688d325b5b2ac903 (patch) | |
tree | 1ec09bb06dc9bb519799719cb158eeca2ec95b55 /gold/mapfile.cc | |
parent | ac0cb9be4eca98d1d734b25c86be567e42697bb3 (diff) | |
download | gdb-ac45a351cf89f2a832a04052688d325b5b2ac903.zip gdb-ac45a351cf89f2a832a04052688d325b5b2ac903.tar.gz gdb-ac45a351cf89f2a832a04052688d325b5b2ac903.tar.bz2 |
2008-08-06 Cary Coutant <ccoutant@google.com>
* archive.cc (Archive::total_archives, Archive::total_members)
(Archive::total_members_loaded): New variables.
(Archive::setup): Add parameter. Add option to preread
archive symbols.
(Archive::read_armap): Add counter.
(Archive::get_file_and_offset): New function.
(Archive::get_elf_object_for_member): New function.
(Archive::read_all_symbols): New function.
(Archive::read_symbols): New function.
(Archive::add_symbols): Add counters.
(Archive::include_all_members): Use armap to find members if it's
already built.
(Archive::include_member): Skip reading symbols if already read.
Factored code into Archive::get_file_and_offset and
Archive::get_elf_object_for_member. Changed call to
Mapfile::report_include_archive_member.
(Archive::print_stats): New function.
* archive.h: Declare Object and Read_symbols_data classes.
(Archive::Archive): Add initializers for new members.
(Archive::setup): Add parameter.
(Archive::print_stats): New function.
(Archive::total_archives, Archive::total_members)
(Archive::total_members_loaded): New variables.
(Archive::get_file_and_offset): New function.
(Archive::get_elf_object_for_member): New function.
(Archive::read_all_symbols): New function.
(Archive::read_symbols): New function.
(Archive::Archive_member): New class.
(Archive::members_): New member.
(Archive::num_members_): New member.
* main.cc: Include archive.h.
(main): Call Archive::print_stats.
* mapfile.cc (Mapfile::report_include_archive_member): Delete
archive parameter; member_name is now the fully-decorated name.
* mapfile.h (Mapfile::report_include_archive_member): Likewise.
* options.h: (General_options): Add --preread-archive-symbols option.
* readsyms.cc (Read_symbols::do_read_symbols): Change call to
Archive::setup.
Diffstat (limited to 'gold/mapfile.cc')
-rw-r--r-- | gold/mapfile.cc | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gold/mapfile.cc b/gold/mapfile.cc index 3f1fe28..9cec366 100644 --- a/gold/mapfile.cc +++ b/gold/mapfile.cc @@ -105,8 +105,7 @@ Mapfile::advance_to_column(size_t from, size_t to) // Report about including a member from an archive. void -Mapfile::report_include_archive_member(const Archive* archive, - const std::string& member_name, +Mapfile::report_include_archive_member(const std::string& member_name, const Symbol* sym, const char* why) { // We print a header before the list of archive members, mainly for @@ -118,13 +117,9 @@ Mapfile::report_include_archive_member(const Archive* archive, this->printed_archive_header_ = true; } - fprintf(this->map_file_, "%s(%s)", archive->file().filename().c_str(), - member_name.c_str()); + fprintf(this->map_file_, "%s", member_name.c_str()); - size_t len = (archive->file().filename().length() - + member_name.length() - + 2); - this->advance_to_column(len, 30); + this->advance_to_column(member_name.length(), 30); if (sym == NULL) fprintf(this->map_file_, "%s", why); |