Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information
1 parent
418f3ec
commit 2c4af3e
Showing
2 changed files
with
57 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters