Generally it is the linker that seems to be the issue AFAIK. 32 bit platforms can no longer link at all for large programs like Firefox. Link time optimization will probably make this worse. The gold linker (that Android uses) uses less memory than GNU ld; possibly the llvm linker is better too.