From: "Daniel Colascione" <dancol@dancol.org>
To: "Paul Eggert" <eggert@cs.ucla.edu>
Cc: Daniel Colascione <dancol@dancol.org>, emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master d826037 3/3: Remove the need for temacs.in
Date: Wed, 10 Apr 2019 12:42:32 -0700 [thread overview]
Message-ID: <7bd7a4577abcebd089c7aecc253718f2.squirrel@dancol.org> (raw)
In-Reply-To: <9093e1cb-7cad-14df-9428-6229313e8f51@cs.ucla.edu>
> On 4/10/19 11:53 AM, Daniel Colascione wrote:
>> Computing a fingerprint over temacs.in factors link
>> layout information into the fingerprint hash. Your approach doesn't.
>> It's
>> possible to link Emacs in different ways from the same object files and
>> produce different binaries.
>
> Computing a fingerprint over temacs.in also omitted layout information.
temacs.in's layout is identical to temacs because temacs.in and temacs
differ only in the contents of the fingerprint array. They have the same
symbols in the same order in the same section. The temacs.in mechanism
covers all current and *and unknown future* binary layout modifications.
It breaks only if linker symbol arrangement depends on randomness or on
the precise content of the fingerprint array, and both of these
possibilities are unlikely.
The right way to avoid the need for temacs.in is to teach the build system
how to find the fingerprint array in the temacs binary and overwrite it
*in place* with the hash of temacs. If you want to do that, great --- I
suspect some invocation of nm(1) could tell you the file offset of the
symbol. This approach would even work in the case of a linker that did
randomize symbol locations.
Your approach isn't the right one though. Please stop making unsafe
changes for the sake of insignificant speedups to local development.
> This was particularly true when building position-independent
> executables. But even for the non-PIE case the fingerprint did not cover
> dynamically-linked libraries.
PIE and shared libraries are irrelevant. The whole point of pdumper is to
be invariant across different PIE and DSO configurations. Neither PIE
relocation nor DSO load addresses affect the *internal* layout of the
Emacs binary image *at runtime*, which is what we really care about. With
your change, the fingerprint calculation misses important and relevant
information. It's unsafe. There's a better way to speed up the build.
next prev parent reply other threads:[~2019-04-10 19:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190409224339.20116.87667@vcs0.savannah.gnu.org>
[not found] ` <20190409224342.0DA1F20E54@vcs0.savannah.gnu.org>
2019-04-10 18:53 ` [Emacs-diffs] master d826037 3/3: Remove the need for temacs.in Daniel Colascione
2019-04-10 19:31 ` Paul Eggert
2019-04-10 19:42 ` Daniel Colascione [this message]
2019-04-10 20:43 ` Paul Eggert
2019-04-10 20:56 ` Daniel Colascione
2019-04-11 3:31 ` Paul Eggert
2019-04-11 22:24 ` Daniel Colascione
2019-04-12 3:45 ` Paul Eggert
2019-04-12 4:20 ` Daniel Colascione
2019-04-13 6:52 ` Eli Zaretskii
2019-04-14 3:40 ` Stefan Monnier
2019-04-14 3:43 ` Daniel Colascione
2019-04-14 4:08 ` Stefan Monnier
2019-04-14 14:03 ` Eli Zaretskii
2019-04-14 14:55 ` Stefan Monnier
2019-04-14 15:47 ` dancol
2019-04-14 17:30 ` Stefan Monnier
2019-04-14 17:44 ` Eli Zaretskii
2019-04-15 0:19 ` Paul Eggert
2019-04-11 19:35 ` Stefan Monnier
2019-04-11 22:15 ` Daniel Colascione
2019-04-11 23:37 ` Stefan Monnier
[not found] ` <20190409224341.BED1520E43@vcs0.savannah.gnu.org>
2019-04-10 19:00 ` [Emacs-diffs] master e44ff2d 2/3: Remove assumption of uint64_t etc. in portable code Daniel Colascione
2019-04-10 19:51 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7bd7a4577abcebd089c7aecc253718f2.squirrel@dancol.org \
--to=dancol@dancol.org \
--cc=eggert@cs.ucla.edu \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.