Short status: Target is 68332, compiler and linker is Microtec C++. Application is written mainly in C++.
We are running out of FLASH memory, and a check in the linker map revealed, that 800 Kbyte out of almost 2 Mbyte is used for the strings segment. Quite a lot for an embedded system with no GUI.
Further checks with the cygwin command
reveals, that most of the strings are RTTI information for C++, and many are repeated 50 or 100 times!
(Strings finds printable strings in the binary, sort and uniq is used to sort the strings and count duplicates.)
The raw output of strings is approx. 800K as expected, and if the duplicates are removed it is squezed to 120K!
Is there a way to eliminate the duplicate strings? Logically the linker should be able to analyze what is entered into the strings segment, and eliminate identical strings that are already there.
Since the object format is said to be IEEE, it may be possible to use another linker, e.g. GNU ld, without replacing the compiler (which has its "specialities").
Has anyone tried that?