aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2000-02-22 05:52:59 +0000
committerIan Lance Taylor <ian@airs.com>2000-02-22 05:52:59 +0000
commita432cc3d1ca43fdeeb1f0bf160b3531533629132 (patch)
tree2c73ab750d621cc35728f3a94dfcd20191f37df0 /bfd/elf32-i386.c
parent2bd171e0011e5577b841a53468b7467fc7f6eaae (diff)
downloadgdb-a432cc3d1ca43fdeeb1f0bf160b3531533629132.zip
gdb-a432cc3d1ca43fdeeb1f0bf160b3531533629132.tar.gz
gdb-a432cc3d1ca43fdeeb1f0bf160b3531533629132.tar.bz2
* elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
invalid relocation types, and change them to R_386_NONE.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index 0894476..0153fa8 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -231,11 +231,14 @@ elf_i386_info_to_howto_rel (abfd, cache_ptr, dst)
cache_ptr->howto = &elf32_i386_vtinherit_howto;
else if (type == R_386_GNU_VTENTRY)
cache_ptr->howto = &elf32_i386_vtentry_howto;
+ else if (type < R_386_max
+ && (type < FIRST_INVALID_RELOC || type > LAST_INVALID_RELOC))
+ cache_ptr->howto = &elf_howto_table[(int) type];
else
{
- BFD_ASSERT (type < R_386_max);
- BFD_ASSERT (type < FIRST_INVALID_RELOC || type > LAST_INVALID_RELOC);
- cache_ptr->howto = &elf_howto_table[(int) type];
+ (*_bfd_error_handler) (_("%s: invalid relocation type %d"),
+ bfd_get_filename (abfd), (int) type);
+ cache_ptr->howto = &elf_howto_table[(int) R_386_NONE];
}
}