diff options
author | Ian Lance Taylor <ian@airs.com> | 2011-05-31 04:26:49 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2011-05-31 04:26:49 +0000 |
commit | 8dbe1edcd323bb950802a9fb3286bb780d9c0d7f (patch) | |
tree | 8b0bbf58f705ef98a9ac89f6b9e79a56dffbd530 /gold | |
parent | 9ad61fd62f5d45db978e65304a3a2963dc0c2910 (diff) | |
download | gdb-8dbe1edcd323bb950802a9fb3286bb780d9c0d7f.zip gdb-8dbe1edcd323bb950802a9fb3286bb780d9c0d7f.tar.gz gdb-8dbe1edcd323bb950802a9fb3286bb780d9c0d7f.tar.bz2 |
* reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc
sections.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/reloc.cc | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index ba1e407..08429b7 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -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 diff --git a/gold/reloc.cc b/gold/reloc.cc index 97ed337..dacab35 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -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; |