This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi All,
There is a question about -mo compiler option. The -mo compiler option placed each function in a file in its own subsection.
Thus, only the functions that are referenced in the application are linked into the final executable. just now I do a test to confirm the conclusion. In the test project, The demo project dependes on another lib project, and the lib project choosed the -mo compiler option.when I checked the map file,the fuctions that are not referenced in the application also are linked into the final executable. So I was so confuesd, and I want to know, why? and How to use the -mo option correctly?
Compiler version 6.0.8 for c6000 DSP.
BR,
Robert
Hi Robert,
That should not be happening.
First thing I would recommend it to update to the latest Code Generation tools just to make sure it is not a bug (I do not remember any bugs related to the -mo option). If updating does not work, then please attach a test case and I can take a look for you.
The application code has to be built with -mo as well.
When the linker sees an object module file.obj, and all of the sections in that module were built without -mo, then the linker keeps every section from file.obj, regardless of whether those file.obj sections are ever referenced.
Thanks and regards,
-George