- howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, FALSE);
- info->callbacks->einfo
- /* xgettext:c-format */
- (_("%X%H: relocation %s against `%s' cannot be used"
- " when making a shared object; recompile with -fPIC\n"),
- abfd, sec, rel->r_offset, howto->name,
- (h) ? h->root.root.string : "a local symbol");
+ howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, NEWABI_P (abfd));
+ /* An error for unsupported relocations is raised as part
+ of the above search, so we can skip the following. */
+ if (howto != NULL)
+ info->callbacks->einfo
+ /* xgettext:c-format */
+ (_("%X%H: relocation %s against `%s' cannot be used"
+ " when making a shared object; recompile with -fPIC\n"),
+ abfd, sec, rel->r_offset, howto->name,
+ (h) ? h->root.root.string : "a local symbol");