* elfcpp_file.h: Revert last patch.

This commit is contained in:
Ian Lance Taylor 2009-12-14 19:57:47 +00:00
parent 2ea9794110
commit 501e40785c
2 changed files with 9 additions and 5 deletions

View file

@ -1,3 +1,7 @@
2009-12-14 Ian Lance Taylor <iant@google.com>
* elfcpp_file.h: Revert last patch.
2009-12-11 Nick Clifton <nickc@redhat.com> 2009-12-11 Nick Clifton <nickc@redhat.com>
* elfcpp_file.h: Fix shadowed variable warnings. * elfcpp_file.h: Fix shadowed variable warnings.

View file

@ -449,10 +449,10 @@ template<int size, bool big_endian, typename File>
unsigned int unsigned int
Elf_file<size, big_endian, File>::find_section_by_type(unsigned int type) Elf_file<size, big_endian, File>::find_section_by_type(unsigned int type)
{ {
unsigned int tshnum = this->shnum(); unsigned int shnum = this->shnum();
typename File::View v(this->file_->view(this->shoff_, typename File::View v(this->file_->view(this->shoff_,
This::shdr_size * tshnum)); This::shdr_size * shnum));
for (unsigned int i = 0; i < tshnum; i++) for (unsigned int i = 0; i < shnum; i++)
{ {
Ef_shdr shdr(v.data() + This::shdr_size * i); Ef_shdr shdr(v.data() + This::shdr_size * i);
if (shdr.get_sh_type() == type) if (shdr.get_sh_type() == type)
@ -494,8 +494,8 @@ Elf_file<size, big_endian, File>::section_name(unsigned int shndx)
off_t shstr_off; off_t shstr_off;
typename Elf_types<size>::Elf_WXword shstr_size; typename Elf_types<size>::Elf_WXword shstr_size;
{ {
const unsigned int fshstrndx = this->shstrndx_; const unsigned int shstrndx = this->shstrndx_;
typename File::View v(file->view(this->section_header_offset(fshstrndx), typename File::View v(file->view(this->section_header_offset(shstrndx),
This::shdr_size)); This::shdr_size));
Ef_shdr shstr_shdr(v.data()); Ef_shdr shstr_shdr(v.data());
shstr_off = shstr_shdr.get_sh_offset(); shstr_off = shstr_shdr.get_sh_offset();