This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to avoid occupy code memory by "Uncalled Segment"?

There are many functions in my source code. If some functions don't be used in current target. There are some warning message about "Uncalled Segment" after compling. And these uncalled segments also occupy code memory. Does not have any method to avoid occupying code size by these Uncalled Segment. I don't want to use "#if(0)" to pre-disable this function.Does have any way to solve this issue except using "#if(0)"?

Parents Reply Children
  • Thanks for your assistance. About your suggestion. I had tried to integrate all object files(*.obj) to generate a library.
    And then I complied my project with this library, it still has "uncalled segment" and occupy code memory. Why? Does it have any required process I have to do before making the library which has the effect like you said?

  • it still has "uncalled segment" and occupy code memory. Why?

    can't you read?

    I posted "put them in individual source modules"

    if you have 5 functions in an obj file that is in a library and one of those functions is called, the whole obj (all 5 functions )get included.

    Erik