2013-07-22 Sterling Augustine <saugustine@google.com>
authorSterling Augustine <saugustine@google.com>
Mon, 29 Jul 2013 18:29:12 +0000 (18:29 +0000)
committerSterling Augustine <saugustine@google.com>
Mon, 29 Jul 2013 18:29:12 +0000 (18:29 +0000)
commit234d4ab880bf72f0a0c678c551d8245e32ce86fc
tree1bf01149ded8212bce541fc56894422deccd894e
parentc8f30dac8c2799564b9ceff1d299ed876ecda1c9
2013-07-22  Sterling Augustine  <saugustine@google.com>

* dwarf_reader.cc (Dwarf_pubnames_table::read_section):
Convert parameter shndx to local variable. Add parameters symtab
and symtab_size.  Scan over section names.  Find relocation
section corresponding to current section.  Create and initialize
reloc_mapper_ and reloc_type_.
(Dwarf_pubnames_table::read_header):  Add assertion.  Change
unit_length to off_t.  Initialize member unit_length_.  Fill in field
cu_offset_.
* dwarf_reader.h (Dwarf_pubnames_table::Dwarf_pubnames_table):
Initialize new fields unit_length_ and cu_offset_.
(Dwarf_pubnames_table::read_section): Update prototype.
(Dwarf_pubnames_table::cu_offset): New member function.
(Dwarf_pubnames_table::subsection_size): Likewise.
(Dwarf_pubnames_table::cu_offset_, Dwarf_pubnames_table::unit_length):
New fields.
(Dwarf_info_reader::symtab, Dwarf_info_reader::symtab_size): Make
member functions public.
* gdb_index.cc (Gdb_index_info_reader::read_pubnames_and_pubtypes):
Update comment.  Rework logic.  Move repeated parts to...
(Gdb_index_info_reader::read_pubtable): ...here. New function.
(Gdb_index::Gdb_index): Initialize new fields, pubnames_table_,
pubtypes_table_, and stmt_list_offset.
(Gdb_index::map_pubtable_to_dies, Gdb_index::find_pubname_offset,
Gdb_index::find_pubtype_offset,
Gdb_index::map_pubnames_and_types_to_dies): Define new functions.
(Gdb_index::pubnames_read): Update prototype and rework logic.
* gdb_index.h (Gdb_index_info_reader, Dwarf_pubnames_table):
Forward declare.
(Gdb_index::map_pubtable_to_dies, Gdb_index::find_pubname_offset,
Gdb_index::find_pubtype_offset, Gdb_index::pubnames_table)
Gdb_index::pubtypes_table, Gdb_index::map_pubnames_and_types_to_dies,
Gdb_index::map_pubtable_to_dies):
Declare functions.
(Gdb_index::pubnames_read): Update declaration.
(Gdb_index::Pubname_offset_map): New type.
(Gdb_index::cu_pubname_map_, Gdb_index::cu_pubtype_map_,
Gdb_index::pubnames_table_, Gdb_index::pubtypes_table_,
Gdb_index::stmt_list_offset): Declare.
(Gdb_index::pubnames_shndx_, Gdb_index::pubnames_offet_,
Gdb_index::pubtypes_object_, Gdb_index::pubtypes_shndx_)
Gdb_index::pubtypes_offset_): Remove.
gold/ChangeLog
gold/dwarf_reader.cc
gold/dwarf_reader.h
gold/gdb-index.cc
gold/gdb-index.h