jjzjj

c++ - 在 GCC 中替换 "fvtable-gc"

GCCv4.7.1中是否有“fvtable-gc”选项的替代品(GCCv3.x支持)?我想在链接过程中删除未使用的虚函数。fvtable-gcEmitspecialrelocationsforvtablesandvirtualfunctionreferencessothatthelinkercanidentifyunusedvirtualfunctionsandzerooutvtableslotsthatrefertothem.Thisismostusefulwith-ffunction-sectionsand-Wl,--gc-sections,inordertoalsodiscard