This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Commit: Add support for v3 binary annotation patches
- From: Nick Clifton <nickc at redhat dot com>
- To: Christophe Lyon <christophe dot lyon at linaro dot org>
- Cc: binutils <binutils at sourceware dot org>
- Date: Wed, 3 Jan 2018 17:32:46 +0000
- Subject: Re: Commit: Add support for v3 binary annotation patches
- Authentication-results: sourceware.org; auth=none
- References: <87tvw3ck3y.fsf@redhat.com> <CAKdteOY-9sKaWx=YOogKZVr_L3m06WE7T=hWeYOdSB0G_Nb0LQ@mail.gmail.com>
Hi Christophe,
> ../../binutils/objcopy.c: In function 'merge_gnu_build_notes':
> ../../binutils/objcopy.c:2067:4: error: large integer implicitly
> truncated to unsigned type [-Werror=overflow]
> end = 0x7ffffffffffffffUL;
Sorry about that.
Fixed with this patch (committed).
Cheers
Nick
binutils/ChangeLog
2018-01-03 Nick Clifton <nickc@redhat.com>
* objcopy.c (merge_gnu_build_notes): Add cast to maximum address
constants.
diff --git a/binutils/objcopy.c b/binutils/objcopy.c
index 77193b155e..1e39f6d876 100644
--- a/binutils/objcopy.c
+++ b/binutils/objcopy.c
@@ -2064,7 +2064,7 @@ merge_gnu_build_notes (bfd * abfd, asection * sec, bfd_size_type size, bfd_byte
For now though, since v1 and v2 was not intended to
handle gaps, we chose an artificially large end
address. */
- end = 0x7ffffffffffffffUL;
+ end = (bfd_vma) 0x7ffffffffffffffUL;
break;
case 8:
@@ -2083,7 +2083,7 @@ merge_gnu_build_notes (bfd * abfd, asection * sec, bfd_size_type size, bfd_byte
For now though, since v1 and v2 was not intended to
handle gaps, we chose an artificially large end
address. */
- end = 0x7ffffffffffffffUL;
+ end = (bfd_vma) 0x7ffffffffffffffUL;
}
break;