This is the mail archive of the
mailing list for the binutils project.
Re: [Gold Patch] Handle DW_AT_GNU_pubnames in DW_FORM_flag_present
- From: Cary Coutant <ccoutant at google dot com>
- To: Sterling Augustine <saugustine at google dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Fri, 26 Jul 2013 09:42:51 -0700
- Subject: Re: [Gold Patch] Handle DW_AT_GNU_pubnames in DW_FORM_flag_present
- References: <CAEG7qUwZmivrugiy4jxw+jdjTq4vPJuAR59gyaqQQ=ih9FAqMQ at mail dot gmail dot com>
(I know you're about to send me a revised patch, but here are a few
nits I found...)
// If we don't have relocations, shndx will be 0, and
// we'll have to hunt for the .debug_pubnames/pubtypes section.
- if (shndx == 0)
+ const char* name = (this->is_pubtypes_
+ ? ".debug_pubtypes"
+ : ".debug_pubnames");
+ for (unsigned int i = 1; i < object->shnum(); ++i)
Please delete "If we don't have relocations, ... and". We're not using
a relocated offset to find this section anymore, so we have to find
the section by name.
+ // Make sure we have actually read the section.
+ gold_assert(this->buffer_ != NULL);
// Correct the offset. For incremental update links, we have a
// relocated offset that is relative to the output section, but
// here we need an offset relative to the input section.
Move the blank line after the assert.
// Read the unit_length field.
- uint32_t unit_length = this->dwinfo_->read_from_pointer<32>(pinfo);
+ off_t unit_length = this->dwinfo_->read_from_pointer<32>(pinfo);
pinfo += 4;
if (unit_length == 0xffffffff)
unit_length = this->dwinfo_->read_from_pointer<64>(pinfo);
+ this->unit_length_ = unit_length + 12;
It looks like unit_length should really be uint64_t (as is
if (version != 2)
+ this->reloc_mapper_->get_reloc_target(pinfo - this->buffer_,
// Skip the debug_info_offset and debug_info_size fields.
Extra blank line.