diff --git a/binutils/ChangeLog b/binutils/ChangeLog index d13dbb637d..b3a539ab49 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2017-05-02 H.J. Lu + + * objcopy.c (merge_gnu_build_notes): Cast relcount to unsigned + long when comparing with sec->reloc_count. + 2017-05-02 Nick Clifton * objcopy.c (merge_gnu_build_notes): Disable merge if there are diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 36952ecd6f..ccb5e12798 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -2141,7 +2141,7 @@ merge_gnu_build_notes (bfd * abfd, asection * sec, bfd_size_type size, bfd_byte 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. */