public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: binutils@sourceware.org
Subject: Commit: Update description of bfd_fill_in_gnu_debuglink_section
Date: Tue, 21 Feb 2023 11:14:58 +0000	[thread overview]
Message-ID: <87v8jv9snh.fsf@redhat.com> (raw)

Hi Guys,

  I am checking in the patch below to update the description of the
  bfd_fill_in_gnu_debuglink_section function - which will perfectly
  file with both relative filepaths and absolute filepaths.

  The patch also fixes a comment, since the path to the binary file
  is not significant for the link that is actually stored in the
  .gnu_debuglink section.

Cheers
  Nick

diff --git a/bfd/opncls.c b/bfd/opncls.c
index 4d0ca48ee78..5dacad9b7d4 100644
--- a/bfd/opncls.c
+++ b/bfd/opncls.c
@@ -1706,8 +1706,8 @@ SYNOPSIS
 DESCRIPTION
 	Takes a @var{BFD} and containing a .gnu_debuglink section @var{SECT}
 	and fills in the contents of the section to contain a link to the
-	specified @var{filename}.  The filename should be relative to the
-	current directory.
+	specified @var{filename}.  The filename should be absolute or
+	relative to the current directory.
 
 	<<TRUE>> is returned if all is ok.  Otherwise <<FALSE>> is returned
 	and bfd_error is set.
@@ -1733,12 +1733,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd,
       return false;
     }
 
-  /* Make sure that we can read the file.
-     XXX - Should we attempt to locate the debug info file using the same
-     algorithm as gdb ?  At the moment, since we are creating the
-     .gnu_debuglink section, we insist upon the user providing us with a
-     correct-for-section-creation-time path, but this need not conform to
-     the gdb location algorithm.  */
+  /* Open the linked file so that we can compute a CRC.  */
   handle = _bfd_real_fopen (filename, FOPEN_RB);
   if (handle == NULL)
     {


                 reply	other threads:[~2023-02-21 11:15 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=87v8jv9snh.fsf@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).