From e13e2ba45fe23ec4e6d7335b0834290e61605d4d Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 22 Apr 2024 09:30:38 +0930 Subject: 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. --- binutils/objcopy.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- cgit v1.1