public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: use copy_private_symbol_data in objcopy
Date: Tue, 23 Apr 2024 21:11:45 +0930	[thread overview]
Message-ID: <ZieeeYlWq8PFbe7l@squeak.grove.modra.org> (raw)

osympp appearing twice here is not a bug.

	PR 14493
	* objcopy.c (copy_object): Run the symbols through
	bfd_copy_private_symbol_data.

diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index d91ba123c01..634ebae3fc3 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3380,6 +3380,13 @@ copy_object (bfd *ibfd, bfd *obfd, const bfd_arch_info_type *input_arch)
       symcount = filter_symbols (ibfd, obfd, osympp, isympp, symcount);
     }
 
+  for (i = 0; i < symcount; i++)
+    if (!bfd_copy_private_symbol_data (ibfd, osympp[i], obfd, osympp[i]))
+      {
+	status = 1;
+	return false;
+      }
+
   if (dhandle != NULL)
     {
       bool res;

-- 
Alan Modra
Australia Development Lab, IBM

             reply	other threads:[~2024-04-23 11:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 11:41 Alan Modra [this message]
2024-04-23 13:58 ` H.J. Lu

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=ZieeeYlWq8PFbe7l@squeak.grove.modra.org \
    --to=amodra@gmail.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).