summaryrefslogtreecommitdiff
path: root/tools
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
commit6f52504a9723b9b3f313e9d08bcab44daca1beb3 (patch)
treead933d6eefb456d0e9f48e81ca1fd34ffbe047b6 /tools
parent57d29edb07ae100abbe63d40074b8ab2bc7ebe99 (diff)
downloadmtk-20170518-6f52504a9723b9b3f313e9d08bcab44daca1beb3.zip
mtk-20170518-6f52504a9723b9b3f313e9d08bcab44daca1beb3.tar.gz
mtk-20170518-6f52504a9723b9b3f313e9d08bcab44daca1beb3.tar.bz2
mklibs: preserve the uclibc init symbol
SVN-Revision: 18085
Diffstat (limited to 'tools')
-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 0000000..e765150
--- /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)