[Top][All Lists]

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

Re: [Emacs-diffs] master d826037 3/3: Remove the need for temacs.in

From: Paul Eggert
Subject: Re: [Emacs-diffs] master d826037 3/3: Remove the need for temacs.in
Date: Wed, 10 Apr 2019 20:31:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

checksumming the .o files ought to be enough to
generate a fingerprint good enough for the intended purpose of the

No: that's simply wrong. pdumper *does* care about the low-level layout of
objects within Emacs. We have dump-to-emacs relocations based on offsets
from a known symbol within Emacs.

Ah, sorry, I didn't know that.

The linker deciding to lay out objects
within sections in a different order will break the dump.

But why would the linker do that? It sounds like you're worrying that, even if we give the linker the same object files in the same order and ask it to link Emacs again, then the linker might generate a different executable, one that is incompatible with the previous one. But if that's the case, the temacs.in solution has the same problem so we're no worse off than before. And if it's not the case, then what exactly is the failure scenario here? I'm not seeing any failure scenarios for the current approach that can't also be failure scenarios for the previous approach, even now that I know that pdumper cares about object order within a section.

The mechanism could also "break" with whole-program optimization that
inlines the fingerprint array, or with other plausible future changes to
linkers as they get smarter.

The optimization you've described doesn't matter: as long as changing the
*value* of the fingerprint array (not its length!) preserves Emacs *object
layout* change in Emacs, we're good.

The optimization I describe could migrate some or all of the fingerprint array's contents into the code, with the amount of migration depending on the contents of the fingerprint array, and with the migrated contents omitted from the fingerprint array. I don't see how object layout (in the sense that you describe) would be preserved in that scenario.

reply via email to

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