From b82817674f46e4f08a5910719499ddc72399473f Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 4 Aug 2022 12:22:39 +0930 Subject: Don't use BFD_VMA_FMT in binutils BFD_VMA_FMT can't be used in format strings that need to be translated, because the translation won't work when the type of bfd_vma differs from the machine used to compile .pot files. We've known about this for a long time, but patches slip through review. So just get rid of BFD_VMA_FMT, instead using the appropriate PRId64, PRIu64, PRIx64 or PRIo64 and SCN variants for scanf. The patch is mostly mechanical, the only thing requiring any thought is casts needed to preserve PRId64 output from bfd_vma values, or to preserve one of the unsigned output formats from bfd_signed_vma values. --- bfd/elf64-ppc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bfd/elf64-ppc.c') diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index 570b3563f2..cfcd263173 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 = 0x%" BFD_VMA_FMT "x:", stub_entry->stub_offset); + fprintf (stderr, "offset = 0x%" PRIx64 ":", 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; @@ -11736,8 +11736,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) fprintf (stderr, "Expected id %u, got %u\n", htab->stub_id, stub_entry->id); if (stub_entry->stub_offset < stub_entry->group->stub_sec->size) - fprintf (stderr, "Expected offset >= %" BFD_VMA_FMT "x, got %" - BFD_VMA_FMT "x\n", stub_entry->group->stub_sec->size, + fprintf (stderr, "Expected offset >= %" PRIx64 ", got %" + PRIx64 "\n", stub_entry->group->stub_sec->size, stub_entry->stub_offset); if (esd->sec_type == sec_stub) dump_stub ("Previous:", esd->u.last_ent, stub_entry->stub_offset); -- cgit v1.2.3