diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-03 23:27:16 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-04 08:13:45 -0400 |
commit | 5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 (patch) | |
tree | 89d9ac8cad39ef7afdf6dfa1d93a5f06b87a440f /sim/rx/load.c | |
parent | 225bda24db9671e2087fda892f94141625836a40 (diff) | |
download | binutils-gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.gz |
sim: clean up bfd_vma printing
A lot of this code predates the bfd_vma format define, so we have a
random mix of casts to known types so we can printf the value. Use
the BFD_VMA_FMT that now exists to simplify and reliability output
across different build configs.
Diffstat (limited to 'sim/rx/load.c')
-rw-r--r-- | sim/rx/load.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sim/rx/load.c b/sim/rx/load.c index b4523e12ac7..b04826f55c7 100644 --- a/sim/rx/load.c +++ b/sim/rx/load.c @@ -128,8 +128,10 @@ rx_load (bfd *prog, host_callback *callback) base = p->p_paddr; if (verbose > 1) - fprintf (stderr, "[load segment: lma=%08x vma=%08x size=%08x]\n", - (int) base, (int) p->p_vaddr, (int) size); + fprintf (stderr, + "[load segment: lma=%08" BFD_VMA_FMT "x vma=%08x " + "size=%08" BFD_VMA_FMT "x]\n", + base, (int) p->p_vaddr, size); if (callback) xprintf (callback, "Loading section %s, size %#lx lma %08lx vma %08lx\n", @@ -151,7 +153,7 @@ rx_load (bfd *prog, host_callback *callback) } if (bfd_bread (buf, size, prog) != size) { - fprintf (stderr, "Failed to read %lx bytes\n", (long) size); + fprintf (stderr, "Failed to read %" BFD_VMA_FMT "x bytes\n", size); continue; } |