[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: memory exhausted while compiling glibc2.1



On Tue, Aug 24, 1999 at 06:29:59PM -0500, gary@singular.org wrote:
> I am trying to compile glibc2.1 on an acorn risc pc (ARM7) with 64 meg of
> ram. the make get to what seems to be about halfway through and chokes
> here:

> gcc   -shared -Wl,-O1 -o sysdeps/../libc.so
> -Wl,-dynamic-linker=/lib/ld-linux.so.2 -Bsysdeps/../csu/
> -Wl,--version-script=sysdeps/../libc.map -Wl,-soname=libc.so.6  -nostdlib
> -nostartfiles -e __libc_main -u __register_frame -L. -Lsysdeps/../math
> -Lsysdeps/../elf -Lsysdeps/../nss -Lsysdeps/../nis -Lsysdeps/../db2
> -Lsysdeps/../rt -Lsysdeps/../resolv -Lsysdeps/../linuxthreads 
> -Wl,-rpath-link=.:sysdeps/../math:sysdeps/../elf:sysdeps/../nss:sysdeps/../nis:sysdeps/../db2:sysdeps/../rt:sysdeps/../resolv:sysdeps/../linuxthreads -Wl,--whole-archive sysdeps/../elf/soinit.os sysdeps/../libc_pic.os sysdeps/../elf/sofini.os sysdeps/../elf/interp.os sysdeps/../elf/ld.so -Wl,--no-whole-archive -lgcc
> 
> sysdeps/../libc_pic.os: could not read symbols: Memory exhausted
> collect2: ld returned 1 exit status
> gcc: file path prefix `sysdeps/../csu/' never used

Try:

       -no-keep-memory
              The linker normally optimizes for speed over memory
              usage by caching the symbol tables of  input  files
              in memory.  This option tells the linker to instead
              optimize for memory usage, by rereading the  symbol
              tables  as  necessary.  This may be required if the
              linker runs out of memory  space  while  linking  a
              large executable.

So add to that gcc invocation line `-Wl,-no-keep-memory' and it might work.
Am I right in thinking your linker is a.out based and dynamically linked?

-- 
Matthew Wilcox <willy@bofh.ai>
"Windows and MacOS are products, contrived by engineers in the service of
specific companies. Unix, by contrast, is not so much a product as it is a
painstakingly compiled oral history of the hacker subculture." - N Stephenson


Reply to: