1

I'm trying to reduce the size of a shared object produced by go plugin. (Building with 'go build -buildmode=plugin'). As it seems from disassembling the SO, all the public symbols are exported, so the linker cannot remove unused code as it does in executables, resulting with a bloated file size. Is there any way to specify explicitly which symbols I want to export, so the linker could remove the unused code from the binary?

Michael
  • 133
  • 3
  • 12
  • possible duplicate: https://stackoverflow.com/questions/54064390/remove-hosts-source-code-from-plugin-to-reduce-file-size – JimB Jan 14 '19 at 16:00

0 Answers0