+2017-05-01 Alan Modra <amodra@gmail.com>
+
+ * objcopy.c (merge_gnu_build_notes): Correct code deleting
+ relocs.
+
2017-04-28 Nick Clifton <nickc@redhat.com>
PR binutils/21439
if (relcount > 0)
{
- arelent ** rel;
+ arelent **rel = relpp;
- for (rel = relpp; rel < relpp + relcount; rel ++)
- if ((* rel)->howto == NULL)
+ while (rel < relpp + relcount)
+ if ((*rel)->howto != NULL)
+ rel++;
+ else
{
/* Delete eliminated relocs.
FIXME: There are better ways to do this. */
- memmove (rel, rel + 1, ((relcount - (rel - relpp)) - 1) * sizeof (* rel));
- relcount --;
+ memmove (rel, rel + 1,
+ ((relcount - (rel - relpp)) - 1) * sizeof (*rel));
+ relcount--;
}
bfd_set_reloc (abfd, sec, relpp, relcount);
}