4 # compile in only used symbols
6 cmd.extend(gcc_options)
7 - cmd.append("-nostdlib -nostartfiles -shared -Wl,-soname=" + soname)
8 + cmd.append("-nostdlib -nostartfiles -shared -Wl,--gc-sections -Wl,-soname=" + soname)
9 cmd.extend(["-u%s" % a.linker_name() for a in symbols])
10 cmd.extend(["-o", dest_path + "/" + so_file_name + "-so"])
11 cmd.extend(extra_pre_obj)