This is the mail archive of the
mailing list for the binutils project.
Re: RFC: [PATCH] PR ld/18028: 32-bit ld runs out of memory when linking 32-bit clang with debug info
- From: Alan Modra <amodra at gmail dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: binutils at sourceware dot org
- Date: Sat, 28 Feb 2015 10:00:28 +1030
- Subject: Re: RFC: [PATCH] PR ld/18028: 32-bit ld runs out of memory when linking 32-bit clang with debug info
- Authentication-results: sourceware.org; auth=none
- References: <20150227194239 dot GA9961 at intel dot com>
On Fri, Feb 27, 2015 at 11:42:39AM -0800, H.J. Lu wrote:
> When link_info.keep_memory is TRUE, linker caches the relocation
> information and symbol tables of input files in memory. On 32-bit
> hosts, linker runs out of 32-bit virtual memory on input files with many
> relocations. This patch defaults link_info.keep_memory to TRUE only if
> pointer size > 4 and adds a --keep-memory linker option. FIXME: linker
> may run out of physical memory on 64-bit hosts with 4GB ram.
> Any comments?
This is not a good idea. You are slowing down 32-bit host linkers for
the sake of the very few projects that need --no-keep-memory. Better
to modify project makefiles as needed.
Also, --no-keep-memory will exercise code paths that aren't generally
used. I'd be pleasantly surprised if this doesn't expose bugs in some
target dependent code.
Australia Development Lab, IBM