aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf32-ft32.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 949a644..96b9cdf 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2021-01-26 Alan Modra <amodra@gmail.com>
+
+ * elf32-ft32.c (ft32_reloc_type_lookup): Don't miss ft32_reloc_map[0].
+
2021-01-24 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/27231
diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c
index bd0ed3e..5a6ec76 100644
--- a/bfd/elf32-ft32.c
+++ b/bfd/elf32-ft32.c
@@ -267,8 +267,7 @@ ft32_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED,
{
unsigned int i;
- for (i = sizeof (ft32_reloc_map) / sizeof (ft32_reloc_map[0]);
- --i;)
+ for (i = 0; i < sizeof (ft32_reloc_map) / sizeof (ft32_reloc_map[0]); i++)
if (ft32_reloc_map [i].bfd_reloc_val == code)
return & ft32_elf_howto_table [ft32_reloc_map[i].ft32_reloc_val];