* reloc.cc (Sized_relobj_file::do_read_relocs): Ignore empty reloc
authorIan Lance Taylor <ian@airs.com>
Tue, 31 May 2011 04:26:49 +0000 (04:26 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 31 May 2011 04:26:49 +0000 (04:26 +0000)
sections.

gold/ChangeLog
gold/reloc.cc

index ba1e407685a73607b6703187b6d4c4a16d5bed12..08429b72cc4b9fd6d421cac348091f824b34ab58 100644 (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
index 97ed33715a791d61b7544da0f195b9a130bb24c8..dacab35f67252fc0c1fd8dc5056881dbcc6dd3d7 100644 (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;
This page took 0.031321 seconds and 4 git commands to generate.