From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: pdumping "into" the executable Date: Mon, 26 Feb 2018 15:17:06 -0800 Organization: UCLA Computer Science Department Message-ID: <41ac3ca1-a850-2c8a-0ad4-6b410b3932aa@cs.ucla.edu> References: <87d10rpid8.fsf@tromey.com> <40f9317e9ee2220ba612cc117d6174c2.squirrel@dancol.org> <05c667d7-ad68-925b-75e6-5834ee528aa6@dancol.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1519686967 15845 195.159.176.226 (26 Feb 2018 23:16:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Feb 2018 23:16:07 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 Cc: Tom Tromey , Stefan Monnier , emacs-devel@gnu.org To: Daniel Colascione Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 27 00:16:03 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 1eqS02-0003ij-0C for ged-emacs-devel@m.gmane.org; Tue, 27 Feb 2018 00:16:02 +0100 Original-Received: from localhost ([::1]:33826 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqS24-0007fG-0n for ged-emacs-devel@m.gmane.org; Mon, 26 Feb 2018 18:18:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37360) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eqS1B-0007eD-J1 for emacs-devel@gnu.org; Mon, 26 Feb 2018 18:17:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eqS18-0007CQ-9o for emacs-devel@gnu.org; Mon, 26 Feb 2018 18:17:13 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50482) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eqS18-0007Bp-44 for emacs-devel@gnu.org; Mon, 26 Feb 2018 18:17:10 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D39B51616E1; Mon, 26 Feb 2018 15:17:07 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id lMvDpGRRr26b; Mon, 26 Feb 2018 15:17:07 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 0C42C1616F7; Mon, 26 Feb 2018 15:17:07 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id fj7XCt-99c9a; Mon, 26 Feb 2018 15:17:06 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id E1BDB1616E1; Mon, 26 Feb 2018 15:17:06 -0800 (PST) In-Reply-To: <05c667d7-ad68-925b-75e6-5834ee528aa6@dancol.org> Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 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:223097 Archived-At: On 02/26/2018 02:22 PM, Daniel Colascione wrote: > On 12/31/1969 04:00 PM, Paul Eggert wrote: >> On 02/26/2018 01:18 PM, dancol@dancol.org wrote: >>>> Or, just turn the dump to a C file, then compile it >>>> and do a second link.=C2=A0 Aside from (maybe hypothetical) C compil= er >>>> limits, that would be very portable. >>> But not redumpable. >> >> Why couldn't it be redumpable? All that the user should need is a C=20 >> compiler. That's not unreasonable. > > I thought we had this argument back when we were talking about=20 > modules. I think it's unacceptable to require a C compiler and the=20 > presence of Emacs unlinked objects for the proper operation of an=20 > end-user feature. Although using a dumped Emacs is an end-user feature, dumping and=20 redumping are not. Dumping and/or redumping are techniques used to build=20 Emacs, and in practice they should be part of a software build system;=20 for such a thing it's reasonable to assume a C compiler. We already assume a C compiler (or equivalent) when building modules; we=20 don't assume a C compiler only when people are using the modules.=20 Dumping is similar. > >>> Besides, the problem with a second link is that it might change the >>> relative positions of symbols within Emac >> >> How could that be a problem? Symbols known to C code are known by=20 >> their fixed offsets and the second link wouldn't change these=20 >> offsets, and symbols not known to C code need to be reallocated=20 >> anyway during loading. > > The linker is what determines into-translation-unit offsets, not the=20 > compiler. The offsets are patched in at link time. There's no=20 > particular requirement to perform the link the same way every time. For Lisp symbols visible to C, Emacs master currently determines symbol=20 offsets at C-compile-time, not at link time. Does pdumper change this?=20 If so, how and why does it change this? And if not, then I don't see the=20 problem.