We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I am using a third part library and from map file I notice that I include some code of unused functions in my applycation. Do you know how I can remove these functions? And their associated data? Thanks in advance Alberto.
Though this can be safely done, the compiler does not remove these segments. So it is the responsiblity of the library writer to place one function per file to achieve this goal. If you can not get your library writer to do this, then try the following to minimize data loss. char unusedFns( void ) { code char unusedFnsArray[] = { unusedFn1, unusedFn2, unusedFn3 }; return unusedFnsArray[0]; } void mainProgram( void ) { //the code that used to be in main } void main() //make no changes to this function { unusedFns(); mainProgram(); }