[Top][All Lists]

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

Re: Preview: portable dumper

From: Andy Moreton
Subject: Re: Preview: portable dumper
Date: Fri, 16 Feb 2018 11:30:19 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.91 (windows-nt)

On Fri 16 Feb 2018, Eli Zaretskii wrote:

>> 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?

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.


reply via email to

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