From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: compiled lisp file format (Re: Skipping unexec via a big .elc file) Date: Sun, 28 May 2017 07:07:15 -0400 Message-ID: References: <8A8DA980-13A7-4F8B-9D07-391728C673C9@raeburn.org> <83inmq53xk.fsf@gnu.org> <96D35768-314C-43F5-BD5E-B12187759DCA@raeburn.org> <123104DD-447F-4CDB-B3A0-CED80E3AC8C9@raeburn.org> <20170403165736.GA2851@acm> <2497A2D5-FDB1-47FF-AED3-FD4ABE2FE144@raeburn.org> <83lgrhpalq.fsf@gnu.org> <0D99B4FE-FEEF-4565-87D6-E230A05DEF3C@raeburn.org> <86lgrc4vob.fsf@molnjunk.nocrew.org> <834ly0oew1.fsf@gnu.org> <968E8F50-92F6-43C7-B7E4-EE8378943087@raeburn.org> <83wpawmj4d.fsf@gnu.org> <1e397033-8291-1625-8b78-a1e1c200aea5@gmail.com> <18196f08-408d-8b17-423e-8be54507bb84@gmail.com> <8360hkkcgj.fsf@gnu.org> <26b35c16-33e7-0e08-9cc5-6f9b81e40968@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1495969648 11516 195.159.176.226 (28 May 2017 11:07:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 May 2017 11:07:28 +0000 (UTC) Cc: Emacs developers To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 28 13:07:24 2017 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 1dEw2e-0002tF-AW for ged-emacs-devel@m.gmane.org; Sun, 28 May 2017 13:07:24 +0200 Original-Received: from localhost ([::1]:43448 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEw2j-0000mQ-U9 for ged-emacs-devel@m.gmane.org; Sun, 28 May 2017 07:07:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dEw2d-0000ie-G5 for emacs-devel@gnu.org; Sun, 28 May 2017 07:07:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dEw2a-0006hT-6M for emacs-devel@gnu.org; Sun, 28 May 2017 07:07:23 -0400 Original-Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:33758) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dEw2a-0006hI-13 for emacs-devel@gnu.org; Sun, 28 May 2017 07:07:20 -0400 Original-Received: by mail-qt0-x242.google.com with SMTP id a46so6323758qte.0 for ; Sun, 28 May 2017 04:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Qr/H9fC2qtSK95RzVPMbAUaiW3aZJ6H5CSnUyH9TWCA=; b=VowsiKzVBVBeK0NrO0Kwu+sxAeDylfI3YyVnLTnzi9q6IqKZDF4lQoWXz8h8YWPPwY K8zT8KNexoTRbFr7cWTYdX7bIXppcUy4kI7sWsNd1RFUz069iJUWuDgAlhDRru6ne8DL MyD6cwRYRNzuh/tpV0R31BIz3C28JEzAveepQkDcN5rrflL9L9TNiJKyXGr2orv6kYpt hPld+Wi3x1cAZQMYJDReJ4bHgzOVVnylCOlfud/KoMgs38e/8YtWAQaY8pAvDGpbPOWu UO1goBGKSwBAq3yI+ALWyKKsmJcbQ6q4NpRFGFXn/606atVGmswvnz1VzIVRUsP+qkQH wOXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Qr/H9fC2qtSK95RzVPMbAUaiW3aZJ6H5CSnUyH9TWCA=; b=GuB4J6yu6MjFHCGBewp8n9K560DRB7BvNAP/ecI/y0OCG1lOD4Kqd9Xcx1sODNHCz3 17eje40uQXrOE8ZM2AU/5oVLTqOmauT3VDLDiEKweNcxbi/f3BrLK8RuoyDNkdLT3Qwl RYtsFejcLebrqgDrTX8juLD+1SoVP3OWyFxHgQg176npxVDO6Z2x2Z+ffhPg+mPZSOGR rDjF0s6ktunjskEZFjWxIF59XUlfZtdqO8KVkLe/SrrbRPj3f5A1y1ztJJDhvqJV3Qmi RPgDKcwclr1VEhjawt05/L32g1OoHzmVpdg/tHRpyYXP9GhHFDwSPxLgnTXOF9fD0GRK tNhg== X-Gm-Message-State: AODbwcAcH/33/O1ABrt659NI2LABLFkfrK3caHefDe5BhpL1i2p8E6S3 J2Y0Hq6WxaIj1AV3 X-Received: by 10.200.8.187 with SMTP id v56mr13220963qth.213.1495969638152; Sun, 28 May 2017 04:07:18 -0700 (PDT) Original-Received: from [192.168.23.52] (c-73-253-167-23.hsd1.ma.comcast.net. [73.253.167.23]) by smtp.gmail.com with ESMTPSA id f138sm4336480qke.17.2017.05.28.04.07.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 May 2017 04:07:17 -0700 (PDT) In-Reply-To: <26b35c16-33e7-0e08-9cc5-6f9b81e40968@cs.ucla.edu> X-Mailer: Apple Mail (2.3124) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 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:215279 Archived-At: On May 21, 2017, at 04:53, Paul Eggert wrote: > Ken Raeburn wrote: >> The Guile project has taken this idea pretty far; they=E2=80=99re = generating ELF object files with a few special sections for Guile = objects, using the standard DWARF sections for debug information, etc. = While it has a certain appeal (making C modules and Lisp files look much = more similar, maybe being able to link Lisp and C together into one = executable image, letting GDB understand some of your data), switching = to a machine-specific format would be a pretty drastic change, when we = can currently share the files across machines. >=20 > Although it does indeed sound like a big change, I don't see why it = would prevent us from sharing the files across machines. Emacs can use = standard ELF and DWARF format on any platform if Emacs is doing the = loading. And there should be some software-engineering benefit in using = the same format that Guile uses. Sorry for the delay in responding. The ELF format has header fields indicating the word size, endianness, = machine architecture (though there=E2=80=99s a value for =E2=80=9Cnone=E2=80= =9D), and OS ABI. Some fields vary in size or order depending on = whether the 32-bit or 64-bit format is in use. Some other format = details (e.g., relocation types, interpretation of certain ranges of = values in some fields) are architecture- or OS-dependent; we might not = care about many of those details, but relocations are likely needed if = we want to play linking games or use DWARF. I think Guile is using whatever the native word size and architecture = are. If we do that for Emacs, they=E2=80=99re not portable between = platforms. Currently it works for me to put my Lisp files, both source = and compiled, into ~/elisp and use them from different kinds of machines = if my home directory is NFS-mounted. We could instead pick fixed values (say, architecture =E2=80=9Cnone=E2=80=9D= , little-endian, 32-bit), but then there=E2=80=99s no guarantee that we = could use any of the usual GNU tools on them without a bunch of work, or = that we=E2=80=99d ever be able to use non-GNU tools to treat them as = object files. Then again, we couldn=E2=80=99t expect to do the latter = portably anyway, since some of the platforms don=E2=80=99t even use ELF. Ken=