diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2024-04-23 07:07:51 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2024-04-23 08:30:20 -0700 |
commit | 6c2119acf78b4a48caa918c1d63aac7a64a19c82 (patch) | |
tree | 5d3e38ae74f96e7b9af33ac07cea3f65c1df19ca | |
parent | 9085a018caf2c0f27d85bc9d306a54fe390b99c2 (diff) | |
download | gdb-6c2119acf78b4a48caa918c1d63aac7a64a19c82.zip gdb-6c2119acf78b4a48caa918c1d63aac7a64a19c82.tar.gz gdb-6c2119acf78b4a48caa918c1d63aac7a64a19c82.tar.bz2 |
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.
-rw-r--r-- | binutils/objcopy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 634ebae..e8ca1374 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; |