summaryrefslogtreecommitdiff
path: root/bfd/elf32-v850.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-08-13 10:43:29 +0000
committerNick Clifton <nickc@redhat.com>2001-08-13 10:43:29 +0000
commit8e9f3c32417a3fb36c67a16fd02693326955f0b4 (patch)
tree16481cd9c97988dbf955afe63baf5cf3de8f628e /bfd/elf32-v850.c
parentb8b8a3529bab5ea67f22577671f30e0922a393af (diff)
downloadgdb-8e9f3c32417a3fb36c67a16fd02693326955f0b4.tar.gz
Fix bug in previous delta
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r--bfd/elf32-v850.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index 0a5ccdf5976..5e89473a45e 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -523,9 +523,11 @@ v850_elf_reloc_type_lookup (abfd, code)
for (i = ARRAY_SIZE (v850_elf_reloc_map); i --;)
if (v850_elf_reloc_map[i].bfd_reloc_val == code)
{
- BFD_ASSERT (v850_elf_howto_table[code].type == v850_elf_reloc_map[i].elf_reloc_val);
+ int elf_reloc_val = v850_elf_reloc_map[i].elf_reloc_val;
+
+ BFD_ASSERT (v850_elf_howto_table[elf_reloc_val].type == elf_reloc_val);
- return v850_elf_howto_table + code;
+ return v850_elf_howto_table + elf_reloc_val;
}
return NULL;