* reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc

sections.
This commit is contained in:
Ian Lance Taylor 2011-05-31 04:26:49 +00:00
parent 9ad61fd62f
commit 8dbe1edcd3
2 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-05-30 Ian Lance Taylor <iant@google.com>
* reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc
sections.
2011-05-29 Ian Lance Taylor <iant@google.com>
PR gold/12804

View File

@ -322,6 +322,9 @@ Sized_relobj_file<size, big_endian>::do_read_relocs(Read_relocs_data* rd)
off_t sh_size = shdr.get_sh_size();
if (sh_size == 0)
continue;
unsigned int reloc_size;
if (sh_type == elfcpp::SHT_REL)
reloc_size = elfcpp::Elf_sizes<size>::rel_size;