forked from OSchip/llvm-project
[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
This commit is contained in:
parent
5362216c36
commit
edd57e8eb0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue