aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-alpha.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-07-06 10:35:41 +0000
committerNick Clifton <nickc@redhat.com>2005-07-06 10:35:41 +0000
commit0adc9281f0ab9962eb5aa72fe6e8113f9014a93b (patch)
tree4a3249e0c2288bbcf84a4dab0367197d77e68cbc /bfd/coff-alpha.c
parent5d5e6db937d3cf8a7affae6491373a02dd49e445 (diff)
downloadfsf-binutils-gdb-0adc9281f0ab9962eb5aa72fe6e8113f9014a93b.zip
fsf-binutils-gdb-0adc9281f0ab9962eb5aa72fe6e8113f9014a93b.tar.gz
fsf-binutils-gdb-0adc9281f0ab9962eb5aa72fe6e8113f9014a93b.tar.bz2
coff-alpha.c (alpha_adjust_reloc_in): Issue an informative error message if an
unknown reloc is encountered. (alpha_relocate_section): Likewise. ecoff.c (_bfd_ecoff_write_object_contents): Cope with a reloc with a missing howto field.
Diffstat (limited to 'bfd/coff-alpha.c')
-rw-r--r--bfd/coff-alpha.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c
index 62a0bb4..444385e 100644
--- a/bfd/coff-alpha.c
+++ b/bfd/coff-alpha.c
@@ -632,7 +632,15 @@ alpha_adjust_reloc_in (abfd, intern, rptr)
arelent *rptr;
{
if (intern->r_type > ALPHA_R_GPVALUE)
- abort ();
+ {
+ (*_bfd_error_handler)
+ (_("%B: unknown/unsupported relocation type %d"),
+ abfd, intern->r_type);
+ bfd_set_error (bfd_error_bad_value);
+ rptr->addend = 0;
+ rptr->howto = NULL;
+ return;
+ }
switch (intern->r_type)
{
@@ -1521,8 +1529,26 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
switch (r_type)
{
+ case ALPHA_R_GPRELHIGH:
+ (*_bfd_error_handler)
+ (_("%B: unsupported relocation: ALPHA_R_GPRELHIGH"),
+ input_bfd);
+ bfd_set_error (bfd_error_bad_value);
+ continue;
+
+ case ALPHA_R_GPRELLOW:
+ (*_bfd_error_handler)
+ (_("%B: unsupported relocation: ALPHA_R_GPRELLOW"),
+ input_bfd);
+ bfd_set_error (bfd_error_bad_value);
+ continue;
+
default:
- abort ();
+ (*_bfd_error_handler)
+ (_("%B: unknown relocation type %d"),
+ input_bfd, (int) r_type);
+ bfd_set_error (bfd_error_bad_value);
+ continue;
case ALPHA_R_IGNORE:
/* This reloc appears after a GPDISP reloc. On earlier