<div dir="ltr">Linking Debug+Asserts give a lot of symbols.<div><br></div><div>GNU ld has some options to reduce memory usage:</div><div><br></div><div><div>--no-keep-memory</div><div> ld normally optimizes for speed over memory usage by caching the symbol tables of input files in memory. This option tells ld to instead optimize for memory usage, by rereading the symbol tables as necessary. This may</div>
<div> be required if ld runs out of memory space while linking a large executable.</div></div><div><br></div><div><div>--hash-size=number</div><div> Set the default size of the linker's hash tables to a prime number close to number. Increasing this value can reduce the length of time it takes the linker to perform its tasks, at the expense of increasing the</div>
<div> linker's memory requirements. Similarly reducing this value can reduce the memory requirements at the expense of speed.</div></div><div><br></div></div>