* 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.
This commit is contained in:
Roland McGrath
2012-11-01 22:35:06 +00:00
parent e5496e3ec6
commit 50ed5eb142
4 changed files with 23 additions and 15 deletions

View File

@@ -57,7 +57,7 @@ Sized_elf_reloc_mapper<size, big_endian>::symbol_section(
unsigned int symndx, Address* value, bool* is_ordinary)
{
const int symsize = elfcpp::Elf_sizes<size>::sym_size;
gold_assert((symndx + 1) * symsize <= this->symtab_size_);
gold_assert(static_cast<off_t>((symndx + 1) * symsize) <= this->symtab_size_);
elfcpp::Sym<size, big_endian> elfsym(this->symtab_ + symndx * symsize);
*value = elfsym.get_st_value();
return this->object_->adjust_sym_shndx(symndx, elfsym.get_st_shndx(),
@@ -530,7 +530,7 @@ Dwarf_pubnames_table::read_header(off_t offset)
pinfo += 2;
if (version != 2)
return false;
// Skip the debug_info_offset and debug_info_size fields.
pinfo += 2 * this->offset_size_;