From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] Minor objcopy optimisation for copy_relocations_in_section
Date: Fri, 2 Jun 2023 00:12:09 +0000 (GMT) [thread overview]
Message-ID: <20230602001209.A8FAD3858C50@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=56e4ccc924d47c30e7446efe771397d2de141762
commit 56e4ccc924d47c30e7446efe771397d2de141762
Author: Alan Modra <amodra@gmail.com>
Date: Thu Jun 1 17:00:53 2023 +0930
Minor objcopy optimisation for copy_relocations_in_section
* objcopy (copy_relocations_in_section): Don't read the relocs
for STRIP_ALL if keep_specific_htab is empty.
Diff:
---
binutils/objcopy.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 49d54bff9b2..ac40da87018 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -4343,6 +4343,8 @@ copy_relocations_in_section (bfd *ibfd, sec_ptr isection, void *obfdarg)
/* Core files and DWO files do not need to be relocated. */
if (bfd_get_format (obfd) == bfd_core
|| strip_symbols == STRIP_NONDWO
+ || (strip_symbols == STRIP_ALL
+ && htab_elements (keep_specific_htab) == 0)
|| discard_relocations (ibfd, isection))
relsize = 0;
else
reply other threads:[~2023-06-02 0:12 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=20230602001209.A8FAD3858C50@sourceware.org \
--to=amodra@sourceware.org \
--cc=bfd-cvs@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).