From 4195f552a6513934bddcd64d1c8f59829151d6e8 Mon Sep 17 00:00:00 2001 From: Kaz Kojima Date: Thu, 25 Aug 2005 05:10:22 +0000 Subject: [PATCH] * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error. --- bfd/ChangeLog | 4 ++++ bfd/elf32-sh.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index f247693..1940287 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2005-08-25 Kaz Kojima + + * elf32-sh.c (sh_elf_get_flags_from_mach): Fix off-by-one error. + 2005-08-24 H.J. Lu PR ld/1208 diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 7bee661..b2b7c6b 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -6655,7 +6655,7 @@ sh_elf_set_mach_from_flags (bfd *abfd) int sh_elf_get_flags_from_mach (unsigned long mach) { - int i = ARRAY_SIZE (sh_ef_bfd_table); + int i = ARRAY_SIZE (sh_ef_bfd_table) - 1; for (; i>0; i--) if (sh_ef_bfd_table[i] == mach) -- 2.7.4