My ARM based libnds utilizing program seems to be too big to fit into the DS' memory (over 4 megs). Looking at its map file, it seems a lot of libc functions are included into my binary that are unnecessary. Is there a way to prevent most of these functions from being rolled into my binary? Is there some makefile switch or lower level change I can make to effect this?
Cheers,
Enu
Binary too big; Cutting its size by reducing libc includes
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Binary too big; Cutting its size by reducing libc includes
There's no need to post the same question in multiple places, I deleted your other post.
It's rather unlikely that libc is the source of your memory issues, there may be a lot of functions but you'll probably find that collectively they're a relatively small part of your binary. The simplest and recommended way to prevent functions from being rolled into your binary is not to reference them in the first place.
To see what's taking so much space in your binary try this from an msys shell
you can then load symbols.txt in an editor for examination. The options shown will show the largest symbols at the top so mainly you need to figure out if you really need large things in the binary or if they can be held in the filesystem. There's also the option to use compression if possible.
It's rather unlikely that libc is the source of your memory issues, there may be a lot of functions but you'll probably find that collectively they're a relatively small part of your binary. The simplest and recommended way to prevent functions from being rolled into your binary is not to reference them in the first place.
To see what's taking so much space in your binary try this from an msys shell
Code: Select all
$DEVKITARM/bin/arm-eabi-nm -Sr --size-sort <elf file> > symbols.txt
Re: Binary too big; Cutting its size by reducing libc includes
Thanks for the tool tip WinterMute, I appreciate it.
Lately I've been needing to emulate a keyboard on the touch screen, like the excellent one the DS provides on system setup. Might you know of a set of functions and an image available somewhere, or some part of libnds I am unaware of that provides this functionality?
Cheers,
Enu
Lately I've been needing to emulate a keyboard on the touch screen, like the excellent one the DS provides on system setup. Might you know of a set of functions and an image available somewhere, or some part of libnds I am unaware of that provides this functionality?
Cheers,
Enu
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Binary too big; Cutting its size by reducing libc includes
There's a keyboard provided in libnds which operates through stdio calls, see http://libnds.devkitpro.org/a00075.html for the API. There should be a keyboard example in the last stable release example set. We should be rolling libnds 1.3.2 and associated examples in the next day or two.
Re: Binary too big; Cutting its size by reducing libc includes
That would be great WinterMute. Is there a CVS/SVN repository available for the newest version of libnds?
Who is online
Users browsing this forum: No registered users and 3 guests