The type of relcount is long and the type of sec->reloc_count is
unsigned int. On 32-bit hosts, GCC issues an error:
objcopy.c:2144:20: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (relcount > sec->reloc_count)
Cast relcount to unsigned long to silence GCC.
* objcopy.c (merge_gnu_build_notes): Cast relcount to unsigned
long when comparing with sec->reloc_count.
+2017-05-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ * objcopy.c (merge_gnu_build_notes): Cast relcount to unsigned
+ long when comparing with sec->reloc_count.
+
2017-05-02 Nick Clifton <nickc@redhat.com>
* objcopy.c (merge_gnu_build_notes): Disable merge if there are
represent a single external reloc. Unfortunately the current BFD
API does not handle deleting relocs in such situations very well
and so it is unsafe to proceed. */
- if (relcount > sec->reloc_count)
+ if ((unsigned long) relcount > sec->reloc_count)
goto done;
/* Eliminate the duplicates. */