[coldfire-gnu-discuss] Chasing RAM - libc ..

Carlos O'Donell carlos at codesourcery.com
Wed Oct 13 15:39:13 UTC 2010


On 10/13/2010 11:31 AM, m8847 wrote:
> I am a bit short of RAM in my project, so I am trying to free up as much
> as
> possible, and I have seen that libc uses a lot, which I am unsure about.
>
> I have rolled my own malloc()/free(), and thus should not use any library
> version of them. I hope. And I only use C-code, no C++.
>
> These are the worst consuming bits, but maybe these are things that need
> to
> be around(?) (or can I somehow tweak them away?):

Link with -Wl,-Map,linkermap.txt to generate a linker map. The start 
of the linker map shows *why* each object file was pulled into the 
executable e.g. a call to foo requires symbol bar pulling in bar.o.

 From the list of required symbols and dependencies you can track down 
why this data and zero-initialized data is required.

Cheers,
CArlos.
--
Carlos O'Donell
CodeSourcery
carlos at codesourcery.com
(650) 331-3385 x716



More information about the coldfire-gnu-discuss mailing list