http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53570
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-06-04 08:36:53 UTC --- This is expected as there is only one section in the object file. If you use -ffunction-sections -fdata-sections and link with -Wl,--gc-sections. The unused functions/data will be removed. Another way is to use the link time optimizer (-flto on both the compile command line and the link command line; note you need to have the optimization options passed to the link command line also).