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-fr30.c
diff --git
a/bfd/elf32-fr30.c
b/bfd/elf32-fr30.c
index
022a0a9
..
620a43f
100644
(file)
--- a/
bfd/elf32-fr30.c
+++ b/
bfd/elf32-fr30.c
@@
-1,5
+1,5
@@
/* FR30-specific support for 32-bit ELF.
/* FR30-specific support for 32-bit ELF.
- Copyright (C) 1998-201
4
Free Software Foundation, Inc.
+ Copyright (C) 1998-201
5
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
This file is part of BFD, the Binary File Descriptor library.
@@
-375,7
+375,11
@@
fr30_info_to_howto_rela (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_FR30_max);
+ if (r_type >= (unsigned int) R_FR30_max)
+ {
+ _bfd_error_handler (_("%A: invalid FR30 reloc number: %d"), abfd, r_type);
+ r_type = 0;
+ }
cache_ptr->howto = & fr30_elf_howto_table [r_type];
}
\f
cache_ptr->howto = & fr30_elf_howto_table [r_type];
}
\f