This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] implement correct alignment for Mach-O archive entries


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.

ptr = (ptr + 3) & ~3;

or

ptr += 4 - (ptr % 4);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]