aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mklibs/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-10-19 23:26:05 +0000
committerFelix Fietkau <nbd@openwrt.org>2009-10-19 23:26:05 +0000
commitdf959c2ac121bbd16f872f4b152c5d1e856e4be3 (patch)
treecebc8d88f658b08a7e905248091f1d699a77cad4 /tools/mklibs/patches
parente496f76ecb7b1aa5e07b2109f3c436de55dd34e5 (diff)
downloadupstream-df959c2ac121bbd16f872f4b152c5d1e856e4be3.tar.gz
upstream-df959c2ac121bbd16f872f4b152c5d1e856e4be3.tar.bz2
upstream-df959c2ac121bbd16f872f4b152c5d1e856e4be3.zip
mklibs: preserve the uclibc init symbol
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18085 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/mklibs/patches')
-rw-r--r--tools/mklibs/patches/007-uclibc_init.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/mklibs/patches/007-uclibc_init.patch b/tools/mklibs/patches/007-uclibc_init.patch
new file mode 100644
index 0000000000..e76515085c
--- /dev/null
+++ b/tools/mklibs/patches/007-uclibc_init.patch
@@ -0,0 +1,14 @@
+--- a/src/mklibs.py
++++ b/src/mklibs.py
+@@ -571,6 +571,11 @@ while 1:
+ extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o")
+ symbols.add(ProvidedSymbol('__dso_handle', None, None, True))
+
++ if soname in ("libc.so.0"):
++ symbols.add(ProvidedSymbol('__uClibc_init', None, None, True))
++ symbols.add(ProvidedSymbol('__uClibc_fini', None, None, True))
++ extra_flags.append("-Wl,-init,__uClibc_init")
++
+ map_file = find_pic_map(library)
+ if map_file:
+ extra_flags.append("-Wl,--version-script=" + map_file)