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.
This commit is contained in:
parent
e5496e3ec6
commit
50ed5eb142
|
@ -1,3 +1,11 @@
|
|||
2012-11-01 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* 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.
|
||||
|
||||
2012-11-01 Roland McGrath <mcgrathr@google.com>
|
||||
|
||||
* nacl.cc: Include "libiberty.h" for vasprintf declaration.
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -1432,7 +1432,7 @@ Output_section_incremental_inputs<size, big_endian>::do_write(Output_file* of)
|
|||
gold_assert(pov - oview == oview_size);
|
||||
|
||||
// Write the .gnu_incremental_symtab section.
|
||||
gold_assert(global_sym_count * 4 == symtab_size);
|
||||
gold_assert(static_cast<off_t>(global_sym_count) * 4 == symtab_size);
|
||||
this->write_symtab(symtab_view, global_syms, global_sym_count);
|
||||
|
||||
delete[] global_syms;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue