projects
/
platform
/
upstream
/
gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 7.9
[platform/upstream/gdb.git]
/
bfd
/
elf32-d10v.c
diff --git
a/bfd/elf32-d10v.c
b/bfd/elf32-d10v.c
index
f45e2db
..
df9bb89
100644
(file)
--- a/
bfd/elf32-d10v.c
+++ b/
bfd/elf32-d10v.c
@@
-1,5
+1,5
@@
/* D10V-specific support for 32-bit ELF
/* D10V-specific support for 32-bit ELF
- Copyright (C) 1996-201
4
Free Software Foundation, Inc.
+ Copyright (C) 1996-201
5
Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@
-228,7
+228,11
@@
d10v_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED,
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
unsigned int r_type;
r_type = ELF32_R_TYPE (dst->r_info);
- BFD_ASSERT (r_type < (unsigned int) R_D10V_max);
+ if (r_type >= (unsigned int) R_D10V_max)
+ {
+ _bfd_error_handler (_("%A: invalid D10V reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = &elf_d10v_howto_table[r_type];
}
cache_ptr->howto = &elf_d10v_howto_table[r_type];
}