* [binutils-gdb] objcopy.c: Fix bfd_copy_private_symbol_data on 32-bit hosts
@ 2024-04-23 15:38 H.J. Lu
0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2024-04-23 15:38 UTC (permalink / raw)
To: binutils-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6c2119acf78b4a48caa918c1d63aac7a64a19c82
commit 6c2119acf78b4a48caa918c1d63aac7a64a19c82
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Apr 23 07:07:51 2024 -0700
objcopy.c: Fix bfd_copy_private_symbol_data on 32-bit hosts
Use long with bfd_copy_private_symbol_data to fix
.../binutils/objcopy.c: In
function ‘copy_object’:
.../binutils/objcopy.c:3383:17: error: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘long int’ [-Werror=sign-compare]
3383 | for (i = 0; i < symcount; i++)
| ^
on 32-bit hosts.
PR binutils/14493
* objcopy.c (copy_object): Use long with
bfd_copy_private_symbol_data.
Diff:
---
binutils/objcopy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 634ebae3fc3..e8ca1374935 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -3380,8 +3380,8 @@ 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]))
+ for (long s = 0; s < symcount; s++)
+ if (!bfd_copy_private_symbol_data (ibfd, osympp[s], obfd, osympp[s]))
{
status = 1;
return false;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-23 15:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23 15:38 [binutils-gdb] objcopy.c: Fix bfd_copy_private_symbol_data on 32-bit hosts H.J. Lu
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).