]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - sim/rl78/load.c
sim: clean up bfd_vma printing
[thirdparty/binutils-gdb.git] / sim / rl78 / load.c
index f89b5e69c4be359087ec396a488354d5dc5c2be8..c137ba6e40e42ea430cea2ee7817da7700e37192 100644 (file)
@@ -128,12 +128,15 @@ rl78_load (bfd *prog, host_callback *callbacks, const char * const simname)
 
       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 (callbacks)
        xprintf (callbacks,
-                "Loading section %s, size %#lx lma %08lx vma %08lx\n",
-                find_section_name_by_offset (prog, p->p_offset),
+                "Loading section %s, size %#" BFD_VMA_FMT "x "
+                "lma %08" BFD_VMA_FMT "x vma %08lx\n",
+                find_section_name_by_offset (prog, p->p_offset),
                 size, base, p->p_vaddr);
 
       buf = xmalloc (size);
@@ -147,13 +150,16 @@ rl78_load (bfd *prog, host_callback *callbacks, const char * const simname)
 
       if (bfd_bread (buf, size, prog) != size)
        {
-         fprintf (stderr, "%s: Failed to read %lx bytes\n", simname, size);
+         fprintf (stderr, "%s: Failed to read %" BFD_VMA_FMT "x bytes\n",
+                  simname, size);
          continue;
        }
 
       if (base > 0xeffff || base + size > 0xeffff)
        {
-         fprintf (stderr, "%s, Can't load image to RAM/SFR space: 0x%lx - 0x%lx\n",
+         fprintf (stderr,
+                  "%s, Can't load image to RAM/SFR space: 0x%" BFD_VMA_FMT "x "
+                  "- 0x%" BFD_VMA_FMT "x\n",
                   simname, base, base+size);
          continue;
        }