arelent *rel;
bfd_reloc_status_type r;
char *err;
+ unsigned int r_type;
rel = *relp;
- r = bfd_reloc_ok;
- switch (rel->howto->type)
+ if (rel->howto == NULL)
+ {
+ r = bfd_reloc_notsupported;
+ r_type = ALPHA_R_IGNORE;
+ }
+ else
+ {
+ r = bfd_reloc_ok;
+ r_type = rel->howto->type;
+ }
+ switch (r_type)
{
case ALPHA_R_IGNORE:
rel->address += input_section->output_offset;
relocation += rel->addend;
if (tos >= RELOC_STACKSIZE)
- abort ();
+ {
+ r = bfd_reloc_notsupported;
+ break;
+ }
stack[tos++] = relocation;
}
}
if (tos == 0)
- abort ();
+ {
+ r = bfd_reloc_notsupported;
+ break;
+ }
/* The offset and size for this reloc are encoded into the
addend field by alpha_adjust_reloc_in. */
relocation += rel->addend;
if (tos == 0)
- abort ();
+ {
+ r = bfd_reloc_notsupported;
+ break;
+ }
stack[tos - 1] -= relocation;
}
relocation += rel->addend;
if (tos == 0)
- abort ();
+ {
+ r = bfd_reloc_notsupported;
+ break;
+ }
stack[tos - 1] >>= relocation;
}
break;
default:
- abort ();
+ r = bfd_reloc_notsupported;
+ break;
}
if (relocatable)
input_section, rel->address);
break;
case bfd_reloc_outofrange:
+ (*link_info->callbacks->einfo)
+ /* xgettext:c-format */
+ (_("%X%P: %pB(%pA): relocation \"%pR\" goes out of range\n"),
+ abfd, input_section, rel);
+ goto error_return;
+ case bfd_reloc_notsupported:
+ (*link_info->callbacks->einfo)
+ /* xgettext:c-format */
+ (_("%X%P: %pB(%pA): relocation \"%pR\" is not supported\n"),
+ abfd, input_section, rel);
+ goto error_return;
default:
- abort ();
+ (*link_info->callbacks->einfo)
+ /* xgettext:c-format */
+ (_("%X%P: %pB(%pA): relocation \"%pR\""
+ " returns an unrecognized value %x\n"),
+ abfd, input_section, rel, r);
break;
}
}
}
if (tos != 0)
- abort ();
+ goto error_return;
successful_return:
free (reloc_vector);