007-gc_sections.patch 526 B

1234567891011
  1. --- a/src/mklibs
  2. +++ b/src/mklibs
  3. @@ -607,7 +607,7 @@ while 1:
  4. # compile in only used symbols
  5. cmd = []
  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)