This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

linker memory footprint


During the final link of our firmware, the linker takes a huge amount
of memory (> ~240MB) to perform it's task.  Our typical desktop work-
station only has 128MB physical memory; so performance, in a single
word, sucks.  

Before sending the IT group out to buy SIMMs, I'm wondering if there
are any changes we can make to either the way our image is linked or a
linker memory reduction project I can sell management that I should be
working on.

Some details:

We link all of our modules into relocatable objects.  Those objects
are linked with our RTOS library, creating a much larger relocatable 
object, and finally that is linked with startup code and binary images
containing I/O card firmware.  Our intermediate relocatable object is
about 100MB.  The final image is 15MB with symbols, 5MB without.

Our software is built with both i386-aout and powerpc-eabi toolchains
with debugging (-g) enbabled.  The powerpc compiler emits BINCL/EINCL
stabs, which appears to require quite a bit of memory to process.  
But disabling BINCL/EINCL support only transfers the pain to GDB.

I've linked the linker with a memory-leak tracking library, ccmalloc,
and although there apear to be some leaks (~20MB, although I haven't
used ccmalloc enough to determine whether or not there are unreported
leaks or false matches), there are not enough to fully account for the
memory usage.

Short a project that keeps debug information in the object files and
modifies GDB to find it there, is there anything that can be done to
reduce ld's memory usage?

        --jtc

-- 
J.T. Conklin
RedBack Networks

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]