summaryrefslogtreecommitdiffstats
path: root/cross-binutils-2.23.2-xtensa-memset.patch
diff options
context:
space:
mode:
Diffstat (limited to 'cross-binutils-2.23.2-xtensa-memset.patch')
-rw-r--r--cross-binutils-2.23.2-xtensa-memset.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/cross-binutils-2.23.2-xtensa-memset.patch b/cross-binutils-2.23.2-xtensa-memset.patch
new file mode 100644
index 0000000..de891ac
--- /dev/null
+++ b/cross-binutils-2.23.2-xtensa-memset.patch
@@ -0,0 +1,22 @@
+diff -ur binutils-2.23.2-old/bfd/elf32-xtensa.c binutils-2.23.2/bfd/elf32-xtensa.c
+--- binutils-2.23.2-old/bfd/elf32-xtensa.c 2012-06-29 15:46:01.000000000 +0100
++++ binutils-2.23.2/bfd/elf32-xtensa.c 2013-08-09 09:06:51.271162551 +0100
+@@ -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;
+