Skip to content
Commit a4917f74 authored by Rafael Auler's avatar Rafael Auler
Browse files

[LinkerScript] Fix bug in Segment::assignVirtualAddress()

When calculating the start address and size of a segment, lld mistakenly
attributed the start address of the last segment slice to the whole segment
when it should consider the start address of the first slice. In this case, in a
multi-slice segment, Segment::assignVirtualAddress() will return a wrong
segment start address to TargetLayout::assignVirtualAddress(). The effect of
this miscalculation is to allocate some program headers in unnecessarily far
away addresses. This commit fixes this.

Differential Revision: http://reviews.llvm.org/D10951

llvm-svn: 242089
parent 8a414541
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment