projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf6522c
)
Minor objcopy optimisation for copy_relocations_in_section
author
Alan Modra
<amodra@gmail.com>
Thu, 1 Jun 2023 07:30:53 +0000
(17:00 +0930)
committer
Alan Modra
<amodra@gmail.com>
Fri, 2 Jun 2023 00:11:49 +0000
(09:41 +0930)
* objcopy (copy_relocations_in_section): Don't read the relocs
for STRIP_ALL if keep_specific_htab is empty.
binutils/objcopy.c
patch
|
blob
|
history
diff --git
a/binutils/objcopy.c
b/binutils/objcopy.c
index 49d54bff9b2d45c69e677a0447caf148b72dd337..ac40da87018c5edee0b2e0e3d419c02fa0478746 100644
(file)
--- 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