https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81368
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- What I meant is once -fdata-sections/-ffunction-section is set, it cannot be unset. That meant in GCC 5.4, the option was not working correctly; just working accidentally the way you wanted it to work.