From: Ian Lance Taylor Date: Tue, 31 May 2011 04:26:49 +0000 (+0000) Subject: * reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8dbe1edcd323bb950802a9fb3286bb780d9c0d7f;p=binutils-gdb.git * reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc sections. --- diff --git a/gold/ChangeLog b/gold/ChangeLog index ba1e407685a..08429b72cc4 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2011-05-30 Ian Lance Taylor + + * reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc + sections. + 2011-05-29 Ian Lance Taylor PR gold/12804 diff --git a/gold/reloc.cc b/gold/reloc.cc index 97ed33715a7..dacab35f672 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -322,6 +322,9 @@ Sized_relobj_file::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::rel_size;