public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Nick Clifton <nickc@redhat.com>
To: Christophe Lyon <christophe.lyon@linaro.org>
Cc: binutils <binutils@sourceware.org>
Subject: Re: Commit: Add support for v3 binary annotation patches
Date: Wed, 03 Jan 2018 17:32:00 -0000	[thread overview]
Message-ID: <94906a39-1b70-5b14-a405-24d47fad05f6@redhat.com> (raw)
In-Reply-To: <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;
 

      reply	other threads:[~2018-01-03 17:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03 10:28 Nick Clifton
2018-01-03 12:05 ` Christophe Lyon
2018-01-03 17:32   ` Nick Clifton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94906a39-1b70-5b14-a405-24d47fad05f6@redhat.com \
    --to=nickc@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=christophe.lyon@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).