X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=blobdiff_plain;f=tools%2Fmklibs%2Fpatches%2F007-gc_sections.patch;fp=tools%2Fmklibs%2Fpatches%2F007-gc_sections.patch;h=2a75b675b56116b3b9ac64dedd6b67f83cb50841;hp=0000000000000000000000000000000000000000;hb=e3a51b884107a91a7a8151461fe812bb0aa81389;hpb=2a9ad4896a43cb1cf9bd601da2510877dbc4bd80 diff --git a/tools/mklibs/patches/007-gc_sections.patch b/tools/mklibs/patches/007-gc_sections.patch new file mode 100644 index 0000000000..2a75b675b5 --- /dev/null +++ b/tools/mklibs/patches/007-gc_sections.patch @@ -0,0 +1,11 @@ +--- a/src/mklibs ++++ b/src/mklibs +@@ -609,7 +609,7 @@ while 1: + # compile in only used symbols + cmd = [] + cmd.extend(gcc_options) +- cmd.append("-nostdlib -nostartfiles -shared -Wl,-soname=" + soname) ++ cmd.append("-nostdlib -nostartfiles -shared -Wl,--gc-sections -Wl,-soname=" + soname) + cmd.extend(["-u%s" % a.linker_name() for a in symbols]) + cmd.extend(["-o", dest_path + "/" + so_file_name + "-so"]) + cmd.extend(extra_pre_obj)