[mc1322x] "atoi" oversize
Andrew Pullin
pullin at berkeley.edu
Fri Jul 2 13:42:10 EDT 2010
I'll recommend the CodeSourcery toolchain, as I have before. I think
it's a lot more straightforward to use than the whole BitBake ordeal!
There are a couple of minor issues, but overall, it seems to work OK.
And it uses newlib, so an example that uses atoi() ends up being only
2452 bytes .
Someone should really do a writeup for the website on how to get the
CodeSourcery toolchain working with the project ...
-Andrew
On 7/2/2010 8:37 AM, Mariano Alvira wrote:
> On Fri, Jul 02, 2010 at 11:18:27AM -0400, Mariano Alvira wrote:
>> On Fri, Jul 02, 2010 at 04:01:39PM +0200, Daniel Berenguer wrote:
>>
>> In this case its the call to setlocale by strtol --- but I'm having a
>> hard time replacing it without a linker error...
> looking at the .map, setlocale.o is linked because of
>
> uint8_t *_nl_category_name_idxs;
>
> You then have to link with the following line instead of the one from
> the Makefile:
>
> arm-linux-ld -T ../mc1322x.lds -nostartfiles -static
> -Map=printf_redbee-econotag.map -export-dynamic -L
> /home/malvira/mc1322x-oe/tmp/cross/armv4t/lib/gcc/arm-linux/4.3.2
> -L ../lib -L ../src -L obj_redbee-econotag_board
> obj_redbee-econotag_board/printf.o -o printf_redbee-econotag.elf
> ../src/start.o ../src/src.a obj_redbee-econotag_board/board.a
> ../lib/libmc1322x.a --start-group obj_redbee-econotag_board/tests.o
> -lgcc -lgcov -lgcc_eh -lc --end-group
>
> This creates a normal sized elf and binary, but atoi does not work. If
> _nl_category_name_idxs is set properly, however, they may be a chance
> to get the glibc version working.
>
> A better approach might be newlib (either using a newlib toolchain or
> lifting newlib's atoi).
>
> -Mar.
>
> _______________________________________________
> mc1322x mailing list
> mc1322x at devl.org
> http://devl.org/cgi-bin/mailman/listinfo/mc1322x
More information about the mc1322x
mailing list