diff options
author | Roland McGrath <roland@gnu.org> | 2012-11-01 22:35:06 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2012-11-01 22:35:06 +0000 |
commit | 50ed5eb142b3246bd16be9626f0cf9565f44d8f9 (patch) | |
tree | cd5a5be5243c70fc9f6142338cef99a8e915e602 /gold/output.cc | |
parent | e5496e3ec63c885dea17d9abc604b91f1600d563 (diff) | |
download | gdb-50ed5eb142b3246bd16be9626f0cf9565f44d8f9.zip gdb-50ed5eb142b3246bd16be9626f0cf9565f44d8f9.tar.gz gdb-50ed5eb142b3246bd16be9626f0cf9565f44d8f9.tar.bz2 |
gold/
* dwarf_reader.cc (Sized_elf_reloc_mapper::symbol_section): Cast
SYMNDX to off_t before comparing it to this->data_size().
* output.cc (Output_symtab_xindex::endian_do_write): Likewise.
* incremental.cc (Output_section_incremental_inputs::do_write):
Cast GLOBAL_SYM_COUNT to off_t before comparing it to SYMTAB_SIZE.
Diffstat (limited to 'gold/output.cc')
-rw-r--r-- | gold/output.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gold/output.cc b/gold/output.cc index 6e5cd25..b47ad4d 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -1935,7 +1935,7 @@ Output_symtab_xindex::endian_do_write(unsigned char* const oview) ++p) { unsigned int symndx = p->first; - gold_assert(symndx * 4 < this->data_size()); + gold_assert(static_cast<off_t>(symndx) * 4 < this->data_size()); elfcpp::Swap<32, big_endian>::writeval(oview + symndx * 4, p->second); } } @@ -2765,7 +2765,7 @@ Output_section::convert_input_sections_in_list_to_relaxed_sections( (*input_sections)[p->second].set_section_order_index(soi); } } - + // Convert regular input sections into relaxed input sections. RELAXED_SECTIONS // is a vector of pointers to Output_relaxed_input_section or its derived // classes. The relaxed sections must correspond to existing input sections. @@ -2780,7 +2780,7 @@ Output_section::convert_input_sections_to_relaxed_sections( // this. If there is no checkpoint active, just search the current // input section list and replace the sections there. If there is // a checkpoint, also replace the sections there. - + // By default, we look at the whole list. size_t limit = this->input_sections_.size(); @@ -2893,13 +2893,13 @@ Output_section::build_lookup_maps() const for (Output_merge_base::Input_sections::const_iterator is = pomb->input_sections_begin(); is != pomb->input_sections_end(); - ++is) + ++is) { const Const_section_id& csid = *is; this->lookup_maps_->add_merge_input_section(csid.first, csid.second, pomb); } - + } else if (p->is_relaxed_input_section()) { @@ -2941,7 +2941,7 @@ Output_section::is_input_address_mapped(const Relobj* object, { section_offset_type output_offset; bool found = posd->output_offset(object, shndx, offset, &output_offset); - gold_assert(found); + gold_assert(found); return output_offset != -1; } @@ -2976,13 +2976,13 @@ Output_section::output_offset(const Relobj* object, unsigned int shndx, // Look at the Output_section_data_maps first. const Output_section_data* posd = this->find_merge_section(object, shndx); - if (posd == NULL) + if (posd == NULL) posd = this->find_relaxed_input_section(object, shndx); if (posd != NULL) { section_offset_type output_offset; bool found = posd->output_offset(object, shndx, offset, &output_offset); - gold_assert(found); + gold_assert(found); return output_offset; } @@ -3009,7 +3009,7 @@ Output_section::output_address(const Relobj* object, unsigned int shndx, // Look at the Output_section_data_maps first. const Output_section_data* posd = this->find_merge_section(object, shndx); - if (posd == NULL) + if (posd == NULL) posd = this->find_relaxed_input_section(object, shndx); if (posd != NULL && posd->is_address_valid()) { @@ -3495,7 +3495,7 @@ Output_section::Input_section_sort_section_order_index_compare::operator()( // Keep input order if section ordering cannot determine order. if (s1_secn_index == s2_secn_index) return s1.index() < s2.index(); - + return s1_secn_index < s2_secn_index; } @@ -3858,7 +3858,7 @@ Output_section::add_script_input_section(const Input_section& sis) this->input_sections_.push_back(sis); - // Update fast lookup maps if necessary. + // Update fast lookup maps if necessary. if (this->lookup_maps_->is_valid()) { if (sis.is_merge_section()) @@ -4173,7 +4173,7 @@ Output_segment::maximum_alignment() if (!this->is_max_align_known_) { for (int i = 0; i < static_cast<int>(ORDER_MAX); ++i) - { + { const Output_data_list* pdl = &this->output_lists_[i]; uint64_t addralign = Output_segment::maximum_alignment_list(pdl); if (addralign > this->max_align_) |