aboutsummaryrefslogtreecommitdiff
path: root/scripts/trylink
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-10-10 14:41:07 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-10-10 14:41:07 +0000
commit724d196c75e097535d475528002518d5322868c6 (patch)
tree94e4345625688d6071eacecf2bd1e87a9980e90f /scripts/trylink
parent82d38dab917754c9c37aaa7e414a47318b5082fe (diff)
downloadbusybox-724d196c75e097535d475528002518d5322868c6.tar.gz
Move applets/applet.c into libbb, allows to get rid of --whole-archive
(smaller code). Tested in static and shared mode.
Diffstat (limited to 'scripts/trylink')
-rwxr-xr-xscripts/trylink17
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/trylink b/scripts/trylink
index fc87df032..6292dc659 100755
--- a/scripts/trylink
+++ b/scripts/trylink
@@ -19,18 +19,16 @@ debug=false
# List of files to link:
# $l_list == --start-group -llib1 -llib2 --end-group
# --start-group $O_FILES $A_FILES --end-group
-# or for shlib:
-# --start-group --whole-archive $A_FILES --no-whole-archive --end-group
-# otherwise we don't pull in all parts of *.a files. Now we pull in too much.
-# FIXME: make it work without --whole-archive, or better, with --gc-sections.
#
# Shared library link:
# -shared self-explanatory
# -fPIC position-independent code
-# -Wl,--enable-new-dtags ?
-# -Wl,-z,combreloc ?
-# -Wl,-soname="libbusybox.so.$BB_VER"
-# -static Not used, but may be useful! manpage:
+# --enable-new-dtags ?
+# -z,combreloc ?
+# -soname="libbusybox.so.$BB_VER"
+# --undefined=libbusybox_main Seed name to start pulling from
+# (otherwise we'll need --whole-archive)
+# -static Not used, but may be useful! manpage:
# "... This option can be used with -shared.
# Doing so means that a shared library
# is being created but that all of the library's
@@ -174,9 +172,10 @@ if test "$CONFIG_BUILD_LIBBUSYBOX" = y; then
-Wl,--enable-new-dtags \
-Wl,-z,combreloc \
-Wl,-soname="libbusybox.so.$BB_VER" \
+ -Wl,--undefined=libbusybox_main \
-Wl,--sort-common \
-Wl,--sort-section -Wl,alignment \
- -Wl,--start-group -Wl,--whole-archive $A_FILES -Wl,--no-whole-archive -Wl,--end-group \
+ -Wl,--start-group $A_FILES -Wl,--end-group \
$l_list \
-Wl,--warn-common \
-Wl,-Map -Wl,$EXE.map \