Page 1 of 1
[devkitARM] C++ bigger in r26 than r25 - sprintf usage?
Posted: Sun Jun 28, 2009 9:53 pm
by Quirky
It seems like cp-demangle.c is using sprintf rather than siprintf and this adds a fair bit to the size of the final .nds, presumably due to all the floating point stuff. I have no idea why cp-demangle is linked in to my code (some missing C++ flag?), so that could be the real cause of my particular problem, but in r25 it was linked in too but didn't pull in sprintf.
Re: [devkitARM] C++ bigger in r26 than r25 - sprintf usage?
Posted: Sun Jun 28, 2009 10:02 pm
by Quirky
Logically enough, it seems adding -g is doing this. Removing -g reduces the final .nds file by 30-40k. I guess I had gotten used to the fact that -g on the NDS didn't have much overhead.
Re: [devkitARM] C++ bigger in r26 than r25 - sprintf usage?
Posted: Mon Jun 29, 2009 1:53 am
by WinterMute
Interesting, I just did some quick tests with C code and the -g option doesn't seem to make any difference to final binary size. I'll have to do a bit of digging and see what's going on with this in C++.