bfd_mach_o_reloc_info reloc;
if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms))
- {
-fprintf (stderr, "ARm 1\n");
return false;
- }
if (reloc.r_scattered)
{
/* PR 21813: Check for a corrupt PAIR reloc at the start. */
if (res == res_base)
{
- _bfd_error_handler (_("\
-malformed mach-o ARM reloc pair: reloc is first reloc"));
- return false;
+ _bfd_error_handler (_("malformed mach-o ARM reloc pair: "
+ "reloc is first reloc"));
+ return false;
}
if (reloc.r_length == 2)
{
res->address = res[-1].address;
return true;
}
- _bfd_error_handler (_("\
-malformed mach-o ARM reloc pair: invalid length: %d"), reloc.r_length);
+ _bfd_error_handler (_("malformed mach-o ARM reloc pair: "
+ "invalid length: %d"), reloc.r_length);
return false;
case BFD_MACH_O_ARM_RELOC_SECTDIFF:
res->howto = &arm_howto_table[8];
return true;
}
- _bfd_error_handler (_("\
-malformed mach-o ARM sectdiff reloc: invalid length: %d"), reloc.r_length);
+ _bfd_error_handler (_("malformed mach-o ARM sectdiff reloc: "
+ "invalid length: %d"), reloc.r_length);
return false;
case BFD_MACH_O_ARM_RELOC_LOCAL_SECTDIFF:
res->howto = &arm_howto_table[9];
return true;
}
- _bfd_error_handler (_("\
-malformed mach-o ARM local sectdiff reloc: invalid length: %d"),
+ _bfd_error_handler (_("malformed mach-o ARM local sectdiff reloc: "
+ "invalid length: %d"),
reloc.r_length);
return false;
res->howto = &arm_howto_table[14];
return true;
}
- _bfd_error_handler (_("\
-malformed mach-o ARM half sectdiff reloc: invalid length: %d"),
+ _bfd_error_handler (_("malformed mach-o ARM half sectdiff reloc: "
+ "invalid length: %d"),
reloc.r_length);
return false;
res->howto = &arm_howto_table[3];
return true;
default:
- _bfd_error_handler (_("\
-malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"),
+ _bfd_error_handler (_("malformed mach-o ARM vanilla reloc: "
+ "invalid length: %d (pcrel: %d)"),
reloc.r_length, reloc.r_pcrel);
return false;
}
break;
case BFD_MACH_O_ARM_RELOC_PAIR:
+ if (res == res_base)
+ {
+ _bfd_error_handler (_("malformed mach-o ARM reloc pair: "
+ "reloc is first reloc"));
+ return false;
+ }
if (res[-1].howto == &arm_howto_table[12]
&& reloc.r_length == 0)
{
}
}
- _bfd_error_handler (_("\
-malformed mach-o ARM reloc: unknown reloc type: %d"), reloc.r_length);
+ _bfd_error_handler (_("malformed mach-o ARM reloc: "
+ "unknown reloc type: %d"), reloc.r_length);
return false;
}