From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Newsgroups: gmane.lisp.guile.devel Subject: Re: Reducing memory usage of the linker and assembler Date: Tue, 17 Jan 2023 17:54:27 +0100 Message-ID: <87sfg9cda4.fsf@gnu.org> References: <87v8lgrno5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23350"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: Andy Wingo , To: Ludovic =?utf-8?Q?Court=C3=A8s?= Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Jan 17 17:54:52 2023 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pHpEZ-0005tB-Pe for guile-devel@m.gmane-mx.org; Tue, 17 Jan 2023 17:54:52 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHpEI-0006Ji-6a; Tue, 17 Jan 2023 11:54:34 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpEF-0006JK-4U for guile-devel@gnu.org; Tue, 17 Jan 2023 11:54:31 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpEE-0001wM-S0; Tue, 17 Jan 2023 11:54:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=b7IGl6mfYS67wyC3QZHyl0AfAQcW1r+ZieHEH85IB60=; b=JE5ys9iPWrLTyDwQoMfC 5uKTA2FB1XcNDjE28Uvw/8ugTb14UBnECNCaAeHDOUs4Tsu+tvWBRY66uPCxuyj/bcMJaINTBY0FL xIVAV3Qe3k85UYwwbo6+qG9cuUzh7rz9v3lSEGP02Ixu2jt7Bm69PZDhMq9YVleEB55OV43d18H8x 5mqislYaTfTTtg+qAjxQXMBj5ijNmdYa1POMyZJr5yeWKxPBIJUwXWBm+DFPmH6E5fh18+IOLdve9 LRdbUMSHGMgWV9al7HkBCL6uKeyIghZCmfi5Rc2yWi/dip+CHlqbKgpOAcVR6/QGJLIVulJ4xP7l1 6ELjyKcgyvEHGQ==; Original-Received: from [193.50.110.246] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHpEE-0001nw-4a; Tue, 17 Jan 2023 11:54:30 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Octidi 28 =?utf-8?Q?Niv=C3=B4se?= an 231 de la =?utf-8?Q?R=C3=A9volution=2C?= jour du Zinc X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu In-Reply-To: <87v8lgrno5.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 09 Jan 2023 11:46:02 +0100") X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21595 Archived-At: Hello, Ludovic Court=C3=A8s skribis: > The branch replaces the =E2=80=98bv=E2=80=99 field of wit= h =E2=80=98size=E2=80=99 and > =E2=80=98writer=E2=80=99, the latter being a procedure that takes a bytev= ector and > writes to it. > > At this point, =E2=80=98link-elf=E2=80=99 still allocates one bytevector = for each linker > object. Eventually we could rewrite those =E2=80=9Cwriter=E2=80=9D proce= dures to use > binary I/O primitives instead of expecting a bytevector to write to, and > that way we wouldn=E2=80=99t need those temporary bytevectors. It=E2=80= =99s a bit > tedious to do though. I=E2=80=99ve now merged this branch into =E2=80=98main=E2=80=99: 3cd64feb2 * linker: Do not store entire ELF in memory when writing to a f= ile. 4ab71e1f0 * linker: Linker object writer takes a single argument. 041f11b35 * linker, assembler: Avoid intermediate bytevectors. d0d974360 * linker: Separate effectful part of 'add-elf-objects'. d439a3f67 * assembler: Separate effectful part of 'link-docstrs'. 13e2d5b66 * assembler: Separate effectful part of 'link-frame-maps'. dc0c4ccb1 * assembler: Separate effectful part of 'link-procprops'. c7f1522c6 * assembler: Separate effectful part of 'link-dynamic-section'. fc5eae5d0 * assembler: Separate effectful part of 'link-symtab'. 15c4c4ceb * assembler: Separate 'process-relocs' from 'patch-relocs!'. As discussed on IRC, I=E2=80=99d like to tag and upload 3.0.9rc1 hopefully tomorrow to get some testing (in particular portability testing) and release roughly a week later. Thoughts? Ludo=E2=80=99.