How to decrease the size of generated binaries?

后端 未结 7 1236
谎友^
谎友^ 2021-02-01 05:53

I know that there is an option \"-Os\" to \"Optimize for size\", but it has little affect, or even increase the size on some occasion :(

strip (or \"-s\" option) remov

7条回答
  •  囚心锁ツ
    2021-02-01 06:38

    You can try playing with -fdata-sections, -ffunction-sections and -Wl,--gc-sections, but this is not safe, so be sure to understand how they work before using them.

提交回复
热议问题