summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch
diff options
context:
space:
mode:
authorZhenhua Luo <zhenhua.luo@freescale.com>2013-03-13 15:43:04 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-03-15 01:53:04 +0000
commitd350bb84896530455a2cd6f10000ba6db6a10e22 (patch)
treefa820242048165f3bb5a566511e083624848cf16 /meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch
parent5b2aaa3c1ce0aadb2f89ad1ecc791410ea66fe10 (diff)
downloadpoky-d350bb84896530455a2cd6f10000ba6db6a10e22.tar.gz
binutils: fix ineffectual zero of cache and array bounds issue
binutils build fails on Fedora18+: 1. binutils-2.23.1/bfd/elf32-xtensa.c:6078:36: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] memset (sec_cache, 0, sizeof (sec_cache)); ^ 2. binutils-2.23.1/bfd/elf32-xtensa.c:6120:32: error: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to dereference it? [-Werror=sizeof-pointer-memaccess] memset (sec_cache, 0, sizeof (sec_cache)); ^ 3. binutils-2.23.1/opcodes/arc-dis.c:430:13: error: argument to 'sizeof' in '__builtin_strncat' call is the same expression as the destination; did you mean to provide an explicit length? [-Werror=sizeof-pointer-memaccess] sizeof (state->commentBuffer)); ^ 4. binutils-2.23.1/opcodes/rl78-dis.c:230:13: error: array subscript is above array bounds [-Werror=array-bounds] if (oper->use_es && indirect_type (oper->type)) ^ (From OE-Core rev: 5445e12e5a32cc5c51ce8a29f2800692ed831115) Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch')
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch b/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch
new file mode 100644
index 0000000000..aacbfef7d6
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils-2.23.1/binutils-fix-over-array-bounds-issue.patch
@@ -0,0 +1,20 @@
1Upstream-Status: Pending
2
3binutils build fails on Fedora18+ due to over array bounds issue:
4binutils-2.23.1/opcodes/rl78-dis.c:230:13: error: array subscript is above array bounds [-Werror=array-bounds]
5 if (oper->use_es && indirect_type (oper->type))
6 ^
7
8Signed-off-by: Zhenhua Luo <zhenhua.luo@freescale.com>
9
10--- binutils-2.23.1/opcodes/rl78-dis.c.orig 2013-03-12 22:17:47.664361066 -0500
11+++ binutils-2.23.1/opcodes/rl78-dis.c 2013-03-12 23:39:51.383460914 -0500
12@@ -221,7 +221,7 @@
13
14 case '0':
15 case '1':
16- oper = opcode.op + *s - '0';
17+ oper = &opcode.op[*s - '0'];
18 if (do_bang)
19 PC ('!');
20