Fix Darwin linker. Patch from Jean-Daniel Dupas.

llvm-svn: 223865
This commit is contained in:
Rui Ueyama 2014-12-10 00:24:37 +00:00
parent a33c5942a3
commit e4814d0dee
1 changed files with 1 additions and 1 deletions

View File

@ -462,7 +462,7 @@ void Util::layoutSectionsInSegment(SegmentInfo *seg, uint64_t &addr) {
seg->address = addr;
for (SectionInfo *sect : seg->sections) {
sect->address = alignTo(addr, sect->alignment);
addr += sect->size;
addr = sect->address + sect->size;
}
seg->size = llvm::RoundUpToAlignment(addr - seg->address,_context.pageSize());
}