aboutsummaryrefslogtreecommitdiffstats
path: root/tools/mklibs/patches/007-gc_sections.patch
diff options
context:
space:
mode:
authorJames <>2015-11-04 11:49:21 +0000
committerJames <>2015-11-04 11:49:21 +0000
commit716ca530e1c4515d8683c9d5be3d56b301758b66 (patch)
tree700eb5bcc1a462a5f21dcec15ce7c97ecfefa772 /tools/mklibs/patches/007-gc_sections.patch
downloadtrunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.gz
trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.tar.bz2
trunk-47381-716ca530e1c4515d8683c9d5be3d56b301758b66.zip
trunk-47381HEADmaster
Diffstat (limited to 'tools/mklibs/patches/007-gc_sections.patch')
-rw-r--r--tools/mklibs/patches/007-gc_sections.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/mklibs/patches/007-gc_sections.patch b/tools/mklibs/patches/007-gc_sections.patch
new file mode 100644
index 0000000..068d88a
--- /dev/null
+++ b/tools/mklibs/patches/007-gc_sections.patch
@@ -0,0 +1,11 @@
+--- a/src/mklibs
++++ b/src/mklibs
+@@ -607,7 +607,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)