public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: Binutils <binutils@sourceware.org>
Subject: [PATCH] bfd: fix STRICT_PE_FORMAT build
Date: Fri, 21 Apr 2023 12:05:16 +0200	[thread overview]
Message-ID: <f339bf78-9ba2-594b-3dec-232edb0e7f70@suse.com> (raw)

A semicolon was missing and "name" needs to be pointer-to-const. While
adding "const" there, also add it for "sec".

--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -5028,11 +5028,11 @@ coff_classify_symbol (bfd *abfd,
 	 breaks gas generated objects.  */
       if (syment->n_value == 0)
 	{
-	  asection *sec;
-	  char * name;
+	  const asection *sec;
+	  const char *name;
 	  char buf[SYMNMLEN + 1];
 
-	  name = _bfd_coff_internal_syment_name (abfd, syment, buf)
+	  name = _bfd_coff_internal_syment_name (abfd, syment, buf);
 	  sec = coff_section_from_bfd_index (abfd, syment->n_scnum);
 	  if (sec != NULL && name != NULL
 	      && (strcmp (bfd_section_name (sec), name) == 0))

                 reply	other threads:[~2023-04-21 10:05 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=f339bf78-9ba2-594b-3dec-232edb0e7f70@suse.com \
    --to=jbeulich@suse.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).