[devkitARM] C++ bigger in r26 than r25 - sprintf usage?

Post Reply
Quirky
Posts: 19
Joined: Thu Nov 15, 2007 8:45 pm

[devkitARM] C++ bigger in r26 than r25 - sprintf usage?

Post by Quirky » Sun Jun 28, 2009 9:53 pm

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.

Quirky
Posts: 19
Joined: Thu Nov 15, 2007 8:45 pm

Re: [devkitARM] C++ bigger in r26 than r25 - sprintf usage?

Post by Quirky » Sun Jun 28, 2009 10:02 pm

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.

WinterMute
Site Admin
Posts: 1856
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: [devkitARM] C++ bigger in r26 than r25 - sprintf usage?

Post by WinterMute » Mon Jun 29, 2009 1:53 am

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++.
Help keep devkitPro toolchains free, Donate today

Personal Blog

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests