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.

Compiler -mo option vs --symdebug:none



I'm using CCS3.1 for TMS6410 platform.

I've a huge third party library code out of which only a few functions are used. To minimize image size I wanted to use "-mo" compiler option.

I tried it but it seems if "-mo" is used along with "-symdebug:none" option there is no impact on the image size.

However without "-symdebug:none" option, there is some reduction is image size.

I wonder if there is any dependency between these two options?

Thanks !

  • I presume this third party library is supplied in object form.  In particular, I presume you cannot rebuild it.  Thus, you cannot apply -mo when it really matters, which is when the library is built.  Even so, the linker will only bring in files from the library only when it needs some function or data provided in that file.  In most cases, you should not see a lot of unnecessary code or data come from a library, though it is possible.  

    I recommend you try the script lib_footprint.pl from the cg_xml package.  That will show you how much of your memory map is taken up by all the libraries.  That should let you know if you really have a problem.  You may not.

    The -mo and --symdebug:none options have nothing to do with each other.

    One note on --symdebug:none ... This option can reduce the size of the object file, but it has no effect on the amount of target system memory required.

    Thanks and regards,

    -George

  • I've 3rd party source code which I compiled with -mo option.

  • In that case, building with -mo will likely give you better results than not using it.  That said, I am aware of cases where this doesn't work out.  For details, see Appendix A of the this app note.

    Thanks and regards,

    -George