Add a patch for binutils 2.23.1
[open-ath9k-htc-firmware.git] / local / patches / binutils-elf32-xtensa-sec_cache.patch
diff --git a/local/patches/binutils-elf32-xtensa-sec_cache.patch b/local/patches/binutils-elf32-xtensa-sec_cache.patch
new file mode 100644 (file)
index 0000000..facf709
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/bfd/elf32-xtensa.c       2012-06-29 17:46:01.000000000 +0300
++++ b/bfd/elf32-xtensa.c       2013-05-08 19:16:39.436716824 +0300
+@@ -6075,7 +6075,7 @@
+       release_internal_relocs (sec_cache->sec, sec_cache->relocs);
+       if (sec_cache->ptbl)
+       free (sec_cache->ptbl);
+-      memset (sec_cache, 0, sizeof (sec_cache));
++      memset (sec_cache, 0, sizeof (*sec_cache));
+     }
+ }
+@@ -6117,7 +6117,7 @@
+   /* Fill in the new section cache.  */
+   clear_section_cache (sec_cache);
+-  memset (sec_cache, 0, sizeof (sec_cache));
++  memset (sec_cache, 0, sizeof (*sec_cache));
+   sec_cache->sec = sec;
+   sec_cache->contents = contents;