This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] implement correct alignment for Mach-O archive entries
- From: Matt Thomas <matt at 3am-software dot com>
- To: Nathan Froyd <froydnj at mozilla dot com>
- Cc: binutils at sourceware dot org
- Date: Tue, 29 Oct 2013 11:11:05 -0700
- Subject: Re: [PATCH] implement correct alignment for Mach-O archive entries
- Authentication-results: sourceware.org; auth=none
- References: <1383069256-19868-1-git-send-email-froydnj at mozilla dot com>
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);