Skip to content

Commit edd57e8

Browse files
committedFeb 2, 2017
[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 llvm-svn: 293842
1 parent 5362216 commit edd57e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed
 

‎llvm/tools/dsymutil/MachOUtils.cpp

+2
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)
Please sign in to comment.