summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChang S. Bae <chang.seok.bae@intel.com>2017-04-08 01:57:11 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-04-17 14:00:07 -0700
commit3b26c45e7f17c2d4eb3abc46bcfa20115b0d2df0 (patch)
treed14d4c7b7d2113553ba1a2ff8a07eb4a977bc245
parentef1ea87c3c2e45b9f4626cdd8c11823c9241c682 (diff)
downloadnasm-3b26c45e7f17c2d4eb3abc46bcfa20115b0d2df0.tar.gz
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>
-rw-r--r--output/outmacho.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/output/outmacho.c b/output/outmacho.c
index 76de154a..49d42469 100644
--- a/output/outmacho.c
+++ b/output/outmacho.c
@@ -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;
+
}
}