]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Work around a GCC uninitialized warning bug
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 1 Apr 2015 15:14:32 +0000 (08:14 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 1 Apr 2015 15:14:32 +0000 (08:14 -0700)
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work
around a GCC uninitialized warning bug fixed in GCC 4.6.

ld/ChangeLog
ld/emultempl/elf32.em

index ac1abaed547aa6619c65004f315ff6f9496516c5..1348f46c730ac99db1d4660ab307bbd6e822c957 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-01  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work
+       around a GCC uninitialized warning bug fixed in GCC 4.6.
+
 2015-04-01  Tejas Belagod  <tejas.belagod@arm.com>
 
        * emultempl/aarch64elf.em
index ece2fb054d114c4adcecc06daa8a9f2f1ffb4ebe..4dd71abfc38014a51326057c544165d5e765e95c 100644 (file)
@@ -1412,7 +1412,12 @@ gld${EMULATION_NAME}_before_allocation (void)
   asection *sinterp;
   bfd *abfd;
   struct elf_link_hash_entry *ehdr_start = NULL;
+#if defined(__GNUC__) && GCC_VERSION < 4006
+  /* Work around a GCC uninitialized warning bug fixed in GCC 4.6.  */
+  struct bfd_link_hash_entry ehdr_start_save = ehdr_start_save;
+#else
   struct bfd_link_hash_entry ehdr_start_save;
+#endif
 
   if (is_elf_hash_table (link_info.hash))
     {