Compiler adds code twice

  1. I don't know the avr toolchain. The gcc linker (ld) should be able to detect that you are not using any virtual base classes and thus there is no need to include the C2 version. Is Test.elf the final output before it gets sent to the arduino by avrdude? Don't know. Maybe you are looking at an intermediate result. It is also possible to override the linking behavior to include all functions, which I hope is not the case.

  2. Yes that would help. It might get duplicated but at that point you'd only be down a few bytes for the function call even if a duplicate is inserted.

  3. That is very strange. Do you have the map file for that as well?