Search code examples
cgcccompiler-optionssize-reduction

What is the gcc equivalent option for the -qfuncsect option of XL compiler of AIX?


XL Compiler of AIX seems to have the -qfuncsect option which places each function in a seperate object control section with the effect that when the final executable is created it helps in removing unwanted functions.

Is there an equivalent option for the same in gcc? I am unable to find the same.


Solution

  • -ffunction-sections
    -fdata-sections
    

    http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Optimize-Options.html