Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Jan Kratochvil <jan.kratochvil@redhat.com>, 	gdb-patches@sourceware.org
Subject: Re: [patch] build-id .debug files load (like .gnu_debuglink)
Date: Tue, 04 Sep 2007 02:21:00 -0000	[thread overview]
Message-ID: <20070904022123.458E44D04CC@magilla.localdomain> (raw)
In-Reply-To: Eli Zaretskii's message of  Saturday, 1 September 2007 15:15:07 +0300 <uir6uvayc.fsf@gnu.org>

> But the first command, the one to create the separate debug info file,
> is still needed, right?

Nothing about the recommended user procedure for making separate debug
files has changed.  Using --add-gnu-debuglink is not strictly required when
using only new consumers that honor build ID notes, and dealing only with
binaries that were linked with ld --build-id.  But there is no reason not
to do it and it is still required in the event of linking without
--build-id or if concerned with all existing tools that understand
.gnu_debuglink but not build ID notes.

It is the case that strip and objcopy behavior wrt allocated notes sections
has changed, and that the new behavior is required for build IDs to be
preserved in separate debug files.  However, I don't think there is any
reason to burden the user with these details explicitly in the primary
documentation on the subject.  (Hence, there is no need to worry about how
to identify versions of binutils here in the manual.)  No version,
derivative release, snapshot, or chronological state of development in
binutils has included an ld supporting --build-id but an objcopy that
treated it with the old rules.  The objcopy and other tools involved in
splitting a binary into a separate debug file should be no older than the
ld used to create the original binary.  If anything, that's all that needs
to be said in the recipe.  It's beyond unusual for the ld and objcopy et al
one is usng not to have come from the very same build/package, so it's
really not something to worry about.

> This is fine, but there's no need to quote ``debug ID'' every time you
> use it.  I quoted it only when I used it as a name of a method of
> embedding information about the debug file; in other cases I used it
> without quotes.

The canonical term is "build ID", and I do not think it is helpful to
introduce "debug ID" in any documentation.  In fact, the feature per se
does not relate directly to debugging information, though that is indeed
the largest motivation for its use.  

It is also not good to use the term "signature" loosely with relation to
build ID bits.  I would prefer to avoid that term entirely, except perhaps
in a section devoted to discussing selection of ID bits and the issues of
uniqueness and repeatability in detail.  I am concerned about too easily
creating misunderstandings that build ID bits relate to some sort of
guarantee about the origin of binaries or security checks, which they do
not.  (As far as the fundamental feature itself goes, a build ID gives some
bits that the creator of the binary decided to tell you were useful as an
identifier for the binary.  binutils and ld have nothing more to say about
it than that.)


Thanks,
Roland


  parent reply	other threads:[~2007-09-04  2:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-24 18:05 Jan Kratochvil
2007-08-24 18:20 ` Daniel Jacobowitz
2007-08-25 22:49   ` Jan Kratochvil
2007-08-25 23:58     ` Daniel Jacobowitz
2007-08-26  9:41       ` Jan Kratochvil
2007-08-31  9:38         ` Eli Zaretskii
2007-08-31 20:51           ` [patch approval?] " Jan Kratochvil
2007-08-31 21:12             ` Daniel Jacobowitz
2007-09-01  8:01             ` Eli Zaretskii
     [not found]           ` <20070901081934.GA31205@host0.dyn.jankratochvil.net>
2007-09-01 10:31             ` [patch] " Eli Zaretskii
2007-09-01 11:35               ` Jan Kratochvil
2007-09-01 12:15                 ` Eli Zaretskii
2007-09-01 13:12                   ` Jan Kratochvil
2007-09-01 13:25                     ` Mark Kettenis
2007-09-01 14:22                       ` Eli Zaretskii
2007-09-02 13:57                       ` [patch approved?] [doc] " Jan Kratochvil
2007-09-02 17:49                         ` Mark Kettenis
2007-09-02 19:38                         ` Eli Zaretskii
2007-09-01 14:16                     ` [patch] " Eli Zaretskii
2007-09-04  2:21                   ` Roland McGrath [this message]
2007-09-04  3:23                     ` Eli Zaretskii
2007-09-04  7:21                       ` Roland McGrath
2007-09-15  9:52                         ` Eli Zaretskii
2007-09-16 17:19                           ` Roland McGrath
2007-08-25 22:48 ` Roland McGrath

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=20070904022123.458E44D04CC@magilla.localdomain \
    --to=roland@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox