uClibc-Update.
[ipfire-2.x.git] / src / uClibc / sources / binutils / 2.16.1 / sh-flags-off-by-one.patch
1 2005-08-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2
3 * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error.
4
5 Index: bfd/elf32-sh.c
6 ===================================================================
7 RCS file: /cvs/src/src/bfd/elf32-sh.c,v
8 retrieving revision 1.128
9 retrieving revision 1.129
10 diff -u -p -r1.128 -r1.129
11 --- binutils/bfd/elf32-sh.c 25 Aug 2005 02:32:10 -0000 1.128
12 +++ binutils/bfd/elf32-sh.c 25 Aug 2005 05:10:22 -0000 1.129
13 @@ -6655,7 +6655,7 @@ sh_elf_set_mach_from_flags (bfd *abfd)
14 int
15 sh_elf_get_flags_from_mach (unsigned long mach)
16 {
17 - int i = ARRAY_SIZE (sh_ef_bfd_table);
18 + int i = ARRAY_SIZE (sh_ef_bfd_table) - 1;
19
20 for (; i>0; i--)
21 if (sh_ef_bfd_table[i] == mach)