diff --git a/tools/dsymutil/MachOUtils.cpp b/tools/dsymutil/MachOUtils.cpp index 8a730a1d0c8..c1422f6eaab 100644 --- a/tools/dsymutil/MachOUtils.cpp +++ b/tools/dsymutil/MachOUtils.cpp @@ -236,6 +236,8 @@ static void transferSegmentAndSections( if (StringRef("__LINKEDIT") == Segment.segname) { Segment.fileoff = LinkeditOffset; Segment.filesize = LinkeditSize; + // Resize vmsize by rounding to the page size. + Segment.vmsize = alignTo(LinkeditSize, 0x1000); } // Check if the end address of the last segment and our current