aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-01 08:14:32 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-01 08:14:32 -0700
commita0bde39842936bb13f88f13a688b181432aa2593 (patch)
tree92a62d328b25f6a2afa7d472010d4314d6691dce /ld/emultempl
parent6b403daae993621542c249c00ca1e6d3cfef1aa4 (diff)
downloadfsf-binutils-gdb-a0bde39842936bb13f88f13a688b181432aa2593.zip
fsf-binutils-gdb-a0bde39842936bb13f88f13a688b181432aa2593.tar.gz
fsf-binutils-gdb-a0bde39842936bb13f88f13a688b181432aa2593.tar.bz2
Work around a GCC uninitialized warning bug
* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Work around a GCC uninitialized warning bug fixed in GCC 4.6.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/elf32.em5
1 files changed, 5 insertions, 0 deletions
diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em
index ece2fb0..4dd71ab 100644
--- a/ld/emultempl/elf32.em
+++ b/ld/emultempl/elf32.em
@@ -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))
{