[coldfire-gnu-discuss] Chasing RAM - libc ..
m8847
m8847 at abc.se
Wed Oct 13 17:00:58 UTC 2010
On Wed, 13 Oct 2010 11:39:13 -0400, "Carlos O'Donell"
<carlos at codesourcery.com> wrote:
> 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.
> 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.
I don't dare to include the full output of the this onto this list, but
how would I back track from _cslibc_global__atexit below?
is it pulled from lib_a-_new.o, which is pulled from lib_a-cleanupg.o,
which is pulled from lib_a-dtoa.o and so on?
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-vsprintf.o)
./link/bin/ardebug.o (vsprintf)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-__atexitg.o)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-reent.o)
(_cslibc_global__atexit)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-_new.o)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-strtok.o)
(_cslibc_global__new)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-cleanupg.o)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-reent.o)
(_cslibc_global___sdidinit)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-dtoa.o)
/home/micke/CodeSourcery/Sourcery_G++/bin/../lib/gcc/m68k-elf/4.4.1/../../../../m68k-elf/lib/m5208/libc.a(lib_a-svfprintf.o)
(dtoa)
Thanks,
Micael
More information about the coldfire-gnu-discuss
mailing list