public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* linker memory footprint
@ 1999-10-04 18:20 J.T. Conklin
  1999-10-04 18:32 ` Ian Lance Taylor
  0 siblings, 1 reply; 5+ messages in thread
From: J.T. Conklin @ 1999-10-04 18:20 UTC (permalink / raw)
  To: binutils

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: linker memory footprint
  1999-10-04 18:20 linker memory footprint J.T. Conklin
@ 1999-10-04 18:32 ` Ian Lance Taylor
  1999-10-05  9:32   ` hppa1.1-rtems grepossible failure ?\x03 Joel Sherrill
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Lance Taylor @ 1999-10-04 18:32 UTC (permalink / raw)
  To: jtc; +Cc: binutils

   From: jtc@redback.com (J.T. Conklin)
   Date: 04 Oct 1999 18:19:23 -0700

   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.

Are you using the --no-keep-memory option?

   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?

It would be possible to reduce ELF memory usage somewhat, and speed it
up somewhat, by adding an option to skip checking the relocations in
the first pass.  This would only be correct when not doing dynamic
linking, so it could not be the default.  Also, the --no-keep-memory
option would cause about the same amount of memory savings anyhow.

I don't know of any way to reduce memory usage of the a.out linker.

It's quite possible that there is some way to reduce memory usage, but
I just haven't thought of it.  It's also quite possible that there are
bugs.  I don't want to discourage you from investigating.

Ian

^ permalink raw reply	[flat|nested] 5+ messages in thread

* hppa1.1-rtems grepossible failure ?\x03
  1999-10-04 18:32 ` Ian Lance Taylor
@ 1999-10-05  9:32   ` Joel Sherrill
  1999-10-06  7:30     ` hppa1.1-rtems grepossible failure ? Jeffrey A Law
  0 siblings, 1 reply; 5+ messages in thread
From: Joel Sherrill @ 1999-10-05  9:32 UTC (permalink / raw)
  To: binutils

I got this trying to compile:

gcc-2.95.1, newlib 1.8.2, and binutils 990901.  

touch stmp-headers
echo "void __foo () {}" > dummy.c
/usr1/rtems/work/tools/build-hppa1.1-tools/gcc/xgcc
-B/usr1/rtems/work/tools/build-hppa1.1-tools/gcc/
-B/usr2/tools_install/gcc-2.95.1-binutils-990901-newlib-1.8.2-1099/hppa1.1-rtems/hppa1.1-rtems/bin/
-I/usr2/tools_install/gcc-2.95.1-binutils-990901-newlib-1.8.2-1099/hppa1.1-rtems/hppa1.1-rtems/include
-DCROSS_COMPILE -DIN_GCC -DHAIFA    -O2 -g -I./include  -c dummy.c
/tmp/ccMjORtk.s: Assembler messages:
/tmp/ccMjORtk.s:2: Error: Unknown pseudo-op:  `.subspa'
/tmp/ccMjORtk.s:3: Error: Unknown pseudo-op:  `.subspa'
/tmp/ccMjORtk.s:5: Error: Unknown pseudo-op:  `.subspa'
/tmp/ccMjORtk.s:6: Error: Unknown pseudo-op:  `.subspa'
/tmp/ccMjORtk.s:14: Error: Unknown pseudo-op:  `.subspa'
/tmp/ccMjORtk.s:50: Error: Unknown pseudo-op:  `.subspa'

Any ideas?  In the RTEMS source, the hppa port uses .SUBSPA.

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hppa1.1-rtems grepossible failure ?
  1999-10-05  9:32   ` hppa1.1-rtems grepossible failure ?\x03 Joel Sherrill
@ 1999-10-06  7:30     ` Jeffrey A Law
  1999-10-06  9:38       ` Joel Sherrill
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey A Law @ 1999-10-06  7:30 UTC (permalink / raw)
  To: joel.sherrill; +Cc: binutils

  In message < 37FA2EF7.1977EBE8@OARcorp.com >you write:
  > touch stmp-headers
  > echo "void __foo () {}" > dummy.c
  > /usr1/rtems/work/tools/build-hppa1.1-tools/gcc/xgcc
  > -B/usr1/rtems/work/tools/build-hppa1.1-tools/gcc/
  > -B/usr2/tools_install/gcc-2.95.1-binutils-990901-newlib-1.8.2-1099/hppa1.1-
  > rtems/hppa1.1-rtems/bin/
  > -I/usr2/tools_install/gcc-2.95.1-binutils-990901-newlib-1.8.2-1099/hppa1.1-
  > rtems/hppa1.1-rtems/include
  > -DCROSS_COMPILE -DIN_GCC -DHAIFA    -O2 -g -I./include  -c dummy.c
  > /tmp/ccMjORtk.s: Assembler messages:
  > /tmp/ccMjORtk.s:2: Error: Unknown pseudo-op:  `.subspa'
  > /tmp/ccMjORtk.s:3: Error: Unknown pseudo-op:  `.subspa'
  > /tmp/ccMjORtk.s:5: Error: Unknown pseudo-op:  `.subspa'
  > /tmp/ccMjORtk.s:6: Error: Unknown pseudo-op:  `.subspa'
  > /tmp/ccMjORtk.s:14: Error: Unknown pseudo-op:  `.subspa'
  > /tmp/ccMjORtk.s:50: Error: Unknown pseudo-op:  `.subspa'
  > 
  > Any ideas?  In the RTEMS source, the hppa port uses .SUBSPA.
The rtems port will need to be modified to not use .subspa.  .subspa
sectioning directives are not going to be supported for PA ELF targets
anymore.

jeff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: hppa1.1-rtems grepossible failure ?
  1999-10-06  7:30     ` hppa1.1-rtems grepossible failure ? Jeffrey A Law
@ 1999-10-06  9:38       ` Joel Sherrill
  0 siblings, 0 replies; 5+ messages in thread
From: Joel Sherrill @ 1999-10-06  9:38 UTC (permalink / raw)
  To: law; +Cc: binutils

Jeffrey A Law wrote:
> 
>   In message < 37FA2EF7.1977EBE8@OARcorp.com >you write:
>   > touch stmp-headers
>   > echo "void __foo () {}" > dummy.c
>   > /usr1/rtems/work/tools/build-hppa1.1-tools/gcc/xgcc
>   > -B/usr1/rtems/work/tools/build-hppa1.1-tools/gcc/
>   > -B/usr2/tools_install/gcc-2.95.1-binutils-990901-newlib-1.8.2-1099/hppa1.1-
>   > rtems/hppa1.1-rtems/bin/
>   > -I/usr2/tools_install/gcc-2.95.1-binutils-990901-newlib-1.8.2-1099/hppa1.1-
>   > rtems/hppa1.1-rtems/include
>   > -DCROSS_COMPILE -DIN_GCC -DHAIFA    -O2 -g -I./include  -c dummy.c
>   > /tmp/ccMjORtk.s: Assembler messages:
>   > /tmp/ccMjORtk.s:2: Error: Unknown pseudo-op:  `.subspa'
>   > /tmp/ccMjORtk.s:3: Error: Unknown pseudo-op:  `.subspa'
>   > /tmp/ccMjORtk.s:5: Error: Unknown pseudo-op:  `.subspa'
>   > /tmp/ccMjORtk.s:6: Error: Unknown pseudo-op:  `.subspa'
>   > /tmp/ccMjORtk.s:14: Error: Unknown pseudo-op:  `.subspa'
>   > /tmp/ccMjORtk.s:50: Error: Unknown pseudo-op:  `.subspa'
>   >
>   > Any ideas?  In the RTEMS source, the hppa port uses .SUBSPA.
> The rtems port will need to be modified to not use .subspa.  .subspa
> sectioning directives are not going to be supported for PA ELF targets
> anymore.

It has been a long time since I messed with the hppa seriously.  Is
there a simple substitution that I can make?  I don't recall what
.subspa
actually did.  :(

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel@OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~1999-10-06  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-10-04 18:20 linker memory footprint J.T. Conklin
1999-10-04 18:32 ` Ian Lance Taylor
1999-10-05  9:32   ` hppa1.1-rtems grepossible failure ?\x03 Joel Sherrill
1999-10-06  7:30     ` hppa1.1-rtems grepossible failure ? Jeffrey A Law
1999-10-06  9:38       ` Joel Sherrill

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).