aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf32-cris.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 9bc656f..c69fc61 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,7 @@
+2001-10-20 H.J. Lu <hjl@gnu.org>
+
+ * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
+
2001-10-19 H.J. Lu <hjl@gnu.org>
* elfcode.h (elf_object_p): Don't clear D_PAGED if the section
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index 8178425..d4d543b 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -440,7 +440,7 @@ cris_reloc_type_lookup (abfd, code)
unsigned int i;
for (i = sizeof (cris_reloc_map) / sizeof (cris_reloc_map[0]);
- --i;)
+ --i >= 0;)
if (cris_reloc_map [i].bfd_reloc_val == code)
return & cris_elf_howto_table [cris_reloc_map[i].cris_reloc_val];