summaryrefslogtreecommitdiff
path: root/scripts/trylink
diff options
context:
space:
mode:
authorDenys Vlasenko2016-04-22 02:00:04 +0200
committerDenys Vlasenko2016-04-22 02:00:04 +0200
commit663d1da1e68b15397c00d6a094f78c2cf08358ea (patch)
tree7f132caff445a1ed81529af1d3edd45f4515ef0a /scripts/trylink
parent7ff24bd5fb37c58d9e41743a910df147357dda61 (diff)
downloadbusybox-663d1da1e68b15397c00d6a094f78c2cf08358ea.zip
busybox-663d1da1e68b15397c00d6a094f78c2cf08358ea.tar.gz
scripts/trylink: document DATA_SEGMENT_ALIGN() hack
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'scripts/trylink')
-rwxr-xr-xscripts/trylink10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/trylink b/scripts/trylink
index 15435f0..129570a 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -209,6 +209,16 @@ else
# *(.bss SORT_BY_ALIGNMENT(.bss.*) .gnu.linkonce.b.*)
# This will eliminate most of the padding (~3kb).
# Hmm, "ld --sort-section alignment" should do it too.
+ #
+ # There is a ld hack which is meant to decrease disk usage
+ # at the cost of more RAM usage (??!!) in standard ld script:
+ # /* Adjust the address for the data segment. We want to adjust up to
+ # the same address within the page on the next page up. */
+ # . = ALIGN (0x1000) - ((0x1000 - .) & (0x1000 - 1)); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000);
+ # Replace it with:
+ # . = ALIGN (0x1000); . = DATA_SEGMENT_ALIGN (0x1000, 0x1000);
+ # to unconditionally align .data to the next page boundary,
+ # instead of "next page, plus current offset in this page"
try $CC $CFLAGS $LDFLAGS \
-o $EXE \
$SORT_COMMON \