Skip to content

Commit a7c680d

Browse files
[dsymutil] Fix __LINKEDIT vmsize in dsymutil upgrade path
Summary: dsymutil upgrade path can change the size of segment and it needs to update the vmsize of the segment to reflect the size change. rdar://problem/30290714 Reviewers: friss Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D29433 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293842 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent a568eff commit a7c680d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/dsymutil/MachOUtils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,8 @@ static void transferSegmentAndSections(
236236
if (StringRef("__LINKEDIT") == Segment.segname) {
237237
Segment.fileoff = LinkeditOffset;
238238
Segment.filesize = LinkeditSize;
239+
// Resize vmsize by rounding to the page size.
240+
Segment.vmsize = alignTo(LinkeditSize, 0x1000);
239241
}
240242

241243
// Check if the end address of the last segment and our current

0 commit comments

Comments
 (0)