aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-04-22 09:30:38 +0930
committerAlan Modra <amodra@gmail.com>2024-04-23 11:20:41 +0930
commite13e2ba45fe23ec4e6d7335b0834290e61605d4d (patch)
tree714919ea62a2ef6bdad207f0370c7fdc089b55f6 /binutils
parent6705e14a9943e48ccf0f4829a9c23d66b5b83aae (diff)
downloadgdb-e13e2ba45fe23ec4e6d7335b0834290e61605d4d.zip
gdb-e13e2ba45fe23ec4e6d7335b0834290e61605d4d.tar.gz
gdb-e13e2ba45fe23ec4e6d7335b0834290e61605d4d.tar.bz2
use copy_private_symbol_data in objcopy
osympp appearing twice here is not a bug. PR 14493 * objcopy.c (copy_object): Run the symbols through bfd_copy_private_symbol_data.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/objcopy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index d91ba12..634ebae 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;