outmacho: align filesize together with vmsize

According to the Mach-O spec this should not be necessary for .o
files, but it seems that we get problems with extracted dsyms if this
is not done, so do this for now -- we might be able to troubleshoot
this later.

Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
Chang S. Bae 2017-04-08 01:57:11 -07:00 committed by H. Peter Anvin
parent ef1ea87c3c
commit 3b26c45e7f

View file

@ -1162,6 +1162,10 @@ static void macho_calculate_sizes (void)
s->pad = ALIGN(seg_filesize, 4) - seg_filesize;
s->offset = seg_filesize + s->pad;
seg_filesize += s->size + s->pad;
/* filesize and vmsize needs to be aligned */
seg_vmsize += s->pad;
}
}