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

[LinkerScript] Don't create unnecessarily large segments

When using a linker script expression to change the address of a section, even
if the new address is more than a page of distance from the old address, lld
may put everything in the same segment, forcing it to be unnecessarily large.
This patch changes the logic in Segment::assignVirtualAddress() and
Segment::assignFileOffsets() to allow the segment to be sliced into two or more
if it detects a linker script expression that changes a section address.

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

llvm-svn: 242096
parent 418f3ec1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment