[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview: portable dumper

From: Eli Zaretskii
Subject: Re: Preview: portable dumper
Date: Fri, 16 Feb 2018 10:24:29 +0200

> Date: Thu, 15 Feb 2018 15:34:13 -0800
> From: Daniel Colascione <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, Angelo Graziosi <address@hidden>,
>  address@hidden
> 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?

> This way, we could get rid of the current complicated dump-file location 
> logic early in Emacs init.

Can you elaborate why is that logic so complicated?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]