Are you sure those flags has any effect? In the C++ project I'm trying it on --ffunction-sections/-fdata-sections/--gc-sections causes the object files to grow a bit. But the resulting binary is to the byte exactly as big as it was without the flags.