[PATCH] implement correct alignment for Mach-O archive entries
Nathan Froyd
froydnj@mozilla.com
Tue Oct 29 18:15:00 GMT 2013
----- Original Message -----
> On Oct 29, 2013, at 10:54 AM, Nathan Froyd <froydnj@mozilla.com> wrote:
>
> > + if (bfd_get_flavour (abfd) == bfd_target_mach_o_flavour)
> > + ptr += ptr % 4;
> > + else
>
> That does not pad to 4.
Ah, it doesn't quite. We probably get lucky in that PTR is always even,
where that formula does work.
> ptr += 4 - (ptr % 4);
This pads unnecessarily when ptr is a multiple of 4 already.
-Nathan
More information about the Binutils
mailing list