From owner-freebsd-hackers@FreeBSD.ORG Sun Jun 22 05:01:38 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3666337B401 for ; Sun, 22 Jun 2003 05:01:38 -0700 (PDT) Received: from hexagon.stack.nl (hexagon.stack.nl [131.155.140.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4770143F75 for ; Sun, 22 Jun 2003 05:01:37 -0700 (PDT) (envelope-from marcov@stack.nl) Received: by hexagon.stack.nl (Postfix, from userid 65534) id 034861C3A; Sun, 22 Jun 2003 14:01:36 +0200 (CEST) Received: from toad.stack.nl (zen.stack.nl [2001:610:1108:5010::130]) by hexagon.stack.nl (Postfix) with ESMTP id C07B31C33 for ; Sun, 22 Jun 2003 14:01:31 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 816) id 9E5E8108; Sun, 22 Jun 2003 14:01:31 +0200 (CEST) To: freebsd-hackers@freebsd.org Date: Sun, 22 Jun 2003 14:01:31 +0200 (CEST) X-Mailer: ELM [version 2.4ME+ PL88 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Message-Id: <20030622120131.9E5E8108@toad.stack.nl> From: marcov@stack.nl (Marco van de Voort) X-Spam-Status: No, hits=0.0 required=5.0 tests=none version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) Subject: ld: memory exhausted X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 12:01:38 -0000 I'm trying to link a lang/fpc program, and ld bombs out with "ld: Memory exhausted" when it reaches my physical memory limit. Worse, it bombed when only one third of the .a's were loaded. I tried to link with the most optimal deadcode elimination, by simply creating a smartlinkable compilation unit per symbol and it seems that ld needs about 100-120x the binary size in memory, which is a bit steep. (so binary =1 MB, ld uses about 100-150 MB) The binary I'm trying to generate is about 8 MB. (lazarus.freepascal.org, a port recently requested on -ports that I'm looking into) Does some binutils wizard know how to put a break on this behaviour, (e.g. by custom building binutils, it's no problem if that slows down ld) ?