PowerPC64: fix build error on 32-bit hosts
authorAlan Modra <amodra@gmail.com>
Thu, 21 Jul 2022 04:01:51 +0000 (13:31 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 21 Jul 2022 04:05:51 +0000 (13:35 +0930)
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.

bfd/elf64-ppc.c

index 77e8f596d15fd9bdd9415e26da6d280987e9fea0..570b3563f2ce6232f5857e05a8ded5802f2a2f40 100644 (file)
@@ -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;