Use GCC map file generation and an evaluation tool as explained in STM32 mbed: very large compile size - #5 by maxgerhardt to see what function code and other objects are contained in the compiled ELF files.
PIO also has a built in memory analyzer that can give you a better overview. See Redirecting... and 🔥 PlatformIO Home 3.0 Beta and powerful Project Inspection announcement.