[ECOS] strange size issue (i386 vs ARM)
Simon Kallweit
simon.kallweit@intefo.ch
Thu Oct 1 13:32:00 GMT 2009
Mandeep Sandhu wrote:
> Hi Guys,
>
> I have this strange size issue with my app. I was testing my app with
> the Linux Synthetic target and things work fine. The app does not
> utilize any hardware specific feature, rather just relies on the
> availability of 2 network interfaces to do its job (it's lwIP 1.3.1
> from Simon).
>
> Now, I want to finally run this app on my AT91SAM7X512 based board. So
> I did a size comparison to see if it'll fit in the boards memory
> (128KB).
>
> I compiled my app with ecos configured for the at91sam7xek target.
>
> $ arm-eabi-size myapp
> text data bss dec hex filename
> 127168 5940 45092 178200 2b818 myapp
>
> From this it seems bss + data will fit fine in the 128KB of RAM that I
> have on the board.
>
> Look at the size output for the _same_ app compiled with the Linux
> Synthetic target:
>
> $ i386-elf-size myapp
> text data bss dec hex filename
> 103690 7328 8381268 8492286 8194fe myapp
>
> The text size of the ARM binary (~127KB) is understandably larger than
> the i386 one (~102 KB).
>
> But how come the data+bss value is so different!?!? The i386 one is
> more than 8MB!
>
> Is this expected? I'm still googling to find the answer.
Use objdump -t [filename] to get finer grained information where your
memory is used. Synth for example uses bigger stacks. But I don't quite
get myself where all that bss memory is going :)
May someone enlighten us?
Simon
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list