aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-15 23:44:10 +0000
committervda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277>2007-03-15 23:44:10 +0000
commit935eab8dcc875bd10d7f13a39bf0cc1f4bf57607 (patch)
tree17304f6e240a5fb3aefab02a53e5263540b20dec
parent328fdd5b2d96dc870b6ca7b6191b29ceac744220 (diff)
downloadbusybox-w32-935eab8dcc875bd10d7f13a39bf0cc1f4bf57607.tar.gz
busybox-w32-935eab8dcc875bd10d7f13a39bf0cc1f4bf57607.tar.bz2
busybox-w32-935eab8dcc875bd10d7f13a39bf0cc1f4bf57607.zip
build system: produce link map. Rather useful when you
are wondering why your busybox is much bigger that you hoped for. git-svn-id: svn://busybox.net/trunk/busybox@18125 69ca8d6d-28ef-0310-b511-8ec308f3f277
-rw-r--r--Makefile2
-rwxr-xr-xscripts/trylink6
2 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index ddc8b25e6..71ebf8f4a 100644
--- a/Makefile
+++ b/Makefile
@@ -563,7 +563,7 @@ busybox-all := $(core-y) $(libs-y)
563# May be overridden by arch/$(ARCH)/Makefile 563# May be overridden by arch/$(ARCH)/Makefile
564quiet_cmd_busybox__ ?= LINK $@ 564quiet_cmd_busybox__ ?= LINK $@
565 cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \ 565 cmd_busybox__ ?= $(srctree)/scripts/trylink $(CC) $(LDFLAGS) \
566 -o $@ \ 566 -o $@ -Wl,-M \
567 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \ 567 -Wl,--warn-common -Wl,--sort-common -Wl,--gc-sections \
568 -Wl,--start-group $(busybox-all) -Wl,--end-group 568 -Wl,--start-group $(busybox-all) -Wl,--end-group
569 569
diff --git a/scripts/trylink b/scripts/trylink
index 3ac249c73..1cd50c6ed 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -6,7 +6,7 @@ try() {
6 added="$1" 6 added="$1"
7 shift 7 shift
8 $debug && echo "Trying: $* $added" 8 $debug && echo "Trying: $* $added"
9 "$@" $added >/dev/null 2>&1 \ 9 "$@" $added >busybox.map 2>busybox_ld.err \
10 && exit 0 10 && exit 0
11} 11}
12 12
@@ -14,5 +14,5 @@ try "" "$@"
14try "-lm" "$@" 14try "-lm" "$@"
15try "-lcrypt" "$@" 15try "-lcrypt" "$@"
16try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@" 16try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@"
17# It failed. Rerun & let people see the error messages 17# It failed. Let people see the error messages
18"$@" $added 18cat busybox_ld.err