public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: PowerPC64: fix build error on 32-bit hosts
Date: Thu, 21 Jul 2022 13:43:01 +0930	[thread overview]
Message-ID: <YtjSTZ2lD3bxoKlZ@squeak.grove.modra.org> (raw)

elf64-ppc.c:11673:33: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘bfd_vma’ {aka ‘long long unsigned int’} [-Werror=format=]
11673 |   fprintf (stderr, "offset = %#lx:", stub_entry->stub_offset);
      |                              ~~~^    ~~~~~~~~~~~~~~~~~~~~~~~
      |                                 |              |
      |                                 |              bfd_vma {aka long long unsigned int}
      |                                 long unsigned int
      |                              %#llx

	* elf64-ppc.c (dump_stub): Use BFD_VMA_FMT.

diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 77e8f596d15..570b3563f2c 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -11670,7 +11670,7 @@ dump_stub (const char *header,
   fprintf (stderr, "%s id = %u type = %s:%s:%s\n",
 	   header, stub_entry->id, t1, t2, t3);
   fprintf (stderr, "name = %s\n", stub_entry->root.string);
-  fprintf (stderr, "offset = %#lx:", stub_entry->stub_offset);
+  fprintf (stderr, "offset = 0x%" BFD_VMA_FMT "x:", stub_entry->stub_offset);
   for (size_t i = stub_entry->stub_offset; i < end_offset; i += 4)
     {
       asection *stub_sec = stub_entry->group->stub_sec;

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2022-07-21  4:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=YtjSTZ2lD3bxoKlZ@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.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).