Query on -ffunction-section & -fdata-sections options of gcc

后端 未结 5 1360
陌清茗
陌清茗 2020-12-01 07:50

The below mentioned in the GCC Page for the function sections and data sections options:

-ffunction-sections
-fdata-sections
5条回答
  •  甜味超标
    2020-12-01 08:04

    When using those compiler options, you can add the linker option -Wl,--gc-sections that will remove all unused code.

提交回复
热议问题