From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: Preview: portable dumper Date: Fri, 16 Feb 2018 11:30:19 +0000 Message-ID: References: <83o9kpe402.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1518780635 20908 195.159.176.226 (16 Feb 2018 11:30:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 16 Feb 2018 11:30:35 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (windows-nt) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Feb 16 12:30:31 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1emeDL-0003Re-FJ for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2018 12:30:03 +0100 Original-Received: from localhost ([::1]:38561 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emeFN-0007M3-CA for ged-emacs-devel@m.gmane.org; Fri, 16 Feb 2018 06:32:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58547) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emeEX-0007La-NI for emacs-devel@gnu.org; Fri, 16 Feb 2018 06:31:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emeET-0000BD-OZ for emacs-devel@gnu.org; Fri, 16 Feb 2018 06:31:17 -0500 Original-Received: from [195.159.176.226] (port=42309 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1emeET-00007g-Gg for emacs-devel@gnu.org; Fri, 16 Feb 2018 06:31:13 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1emeCE-0007lH-QW for emacs-devel@gnu.org; Fri, 16 Feb 2018 12:28:54 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 40 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:7YzQcavjJ0s5qqg4UZMPdczGVHo= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:222810 Archived-At: On Fri 16 Feb 2018, Eli Zaretskii wrote: >> Date: Thu, 15 Feb 2018 15:34:13 -0800 >> From: Daniel Colascione >> Cc: Eli Zaretskii , Angelo Graziosi , >> emacs-devel@gnu.org >> >> I do wonder whether it makes sense to try to copy the dump into the Emacs executable itself instead of >> leaving it as a separate file. We could do it independently of executable format by defining a data array in static >> storage that's initially full of, say, 15MB of zeroes prefixed by a long random header (like a MIME boundary), >> then, after we generate emacs.pdmp, copying the dump file into the executable at the place where we see >> that random header. If the dump turns out to be bigger than that 15MB, we can fail the build and ask the user >> to enlarge the array. >> >> I don't know of any executable format for which this scheme would fail. > > Wouldn't that make the dumper stuff less portable, in the sense that > it would need to be compatible with low-level details of executable > file formats on various systems? > > At least on non-ELF systems, AFAIK the flexibility of putting > arbitrary sections into an executable is lower than desired. For > example, before Emacs 25 the MS-Windows build would create a special > section for the initialized Emacs data, which had the annoying effect > of running afoul of 'strip', because Binutils don't know about this > section, and therefore stripping would produce a dysfunctional > executable. It also prevented re-dumping Emacs, something we had in > the past and I'd like us to have again in the future. > > Wouldn't copying the dump into the executable hit the same problems, > at least in principle? I don't understand the desire to put the dump within the eamcs executable, as I thought the whole point of this exercise was to avoid dodgy manipulation of executable file formats. Anything that fiddles with the executable prevents signing the executable, which in many environments is desireable. AndyM