AnsweredAssumed Answered

Why do I have duplicate object code shown in my *.map.xml file?

Question asked by newelement on Dec 1, 2010
Latest reply on Dec 12, 2010 by MerrilWeiner

I'm using VisualDSP++ to compile a project written in C++. I've noticed that in my *.map.xml, I have what I consider to be redundant, duplicate instances of the same function.

 

For example, the std::string destructor exists multiple times:

 

File: .\Debug\CFloatingPointProcessingObject.doj

___dt__Q2_3std6stringFv  (std::string::~string())
address = '0x124d68'
size = '0x16'
binding = 'LOCAL'
File: .\Debug\CLinkportManager.doj
___dt__Q2_3std6stringFv  (std::string::~string())
address = '0x12509d'
size = '0x37'
binding = 'LOCAL'
File: .\Debug\CLocalModuleBrowser.doj
___dt__Q2_3std6stringFv  (std::string::~string())
address = '0x1264ab'
size = '0x37'
binding = 'LOCAL'
File: libcpp.dlb[stringany.doj]
___dt__Q2_3std6stringFv  (std::string::~string())
address = '0x13a742'
size = '0x37'
binding = 'LOCAL'

 

I'd expect to find the std::string destructor code in libcpp.dlb, but not anywhere else. I definitely wouldn't expect to see it in CLinkportManager.doj, because that is driver code, and never uses any std::strings.

 

This seems like code bloat to me. Are there project options I need to set to get rid of this? I've tried "Eliminate unused objects" but that doesn't seem to help.

 

This problem is not limited to the std::string destructor. It seems to occur with a lot of STL functions. I think I could shrink my code size by quite a bit if I could solve this problem.

 

Any solutions out there?

Outcomes