have configure check/add -ffunction-sections and -fdata-sections