Missing functions from eh_frame
Posted: Thu Jan 16, 2025 1:47 pm
I'm currently working on rolling my own stack unwind code for ESP32 riscv based microcontrollers. I'm having an issue where all of my functions are missing from the eh_frame section, but all the IDF functions seem to be included. I'm not sure why either the FDE's aren't being generated, or the linker is removing them.
CLion seems to think that my app_main function is unused, although the code compiles correctly and runs fine on the module. Maybe the linker is seeing app_main and all the associated functions as unused and as such is choosing to remove them. I'm not sure how to get CLion to recognise that app_main as used, but it is annotated with __attribute__((used)). I'm not sure if there is a flag for gcc that will stop the linker from cleaning up the eh_frame.
CLion seems to think that my app_main function is unused, although the code compiles correctly and runs fine on the module. Maybe the linker is seeing app_main and all the associated functions as unused and as such is choosing to remove them. I'm not sure how to get CLion to recognise that app_main as used, but it is annotated with __attribute__((used)). I'm not sure if there is a flag for gcc that will stop the linker from cleaning up the eh_frame.