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/erc32 | |
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/erc32')
-rw-r--r-- | sim/erc32/ChangeLog | 4 | ||||
-rw-r--r-- | sim/erc32/func.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog index 12398af8997..a6b142a6ec2 100644 --- a/sim/erc32/ChangeLog +++ b/sim/erc32/ChangeLog @@ -1,3 +1,7 @@ +2021-05-04 Mike Frysinger <vapier@gentoo.org> + + * func.c (bfd_load): Use BFD_VMA_FMT. + 2021-05-01 Mike Frysinger <vapier@gentoo.org> * config.in, configure: Regenerate. diff --git a/sim/erc32/func.c b/sim/erc32/func.c index c6dfa1927ad..52428e48350 100644 --- a/sim/erc32/func.c +++ b/sim/erc32/func.c @@ -1056,7 +1056,7 @@ bfd_load (const char *fname) section_size = bfd_section_size (section); if (sis_verbose) - printf("\nsection %s at 0x%08lx (0x%lx bytes)", + printf("\nsection %s at 0x%08" BFD_VMA_FMT "x (0x%lx bytes)", section_name, section_address, section_size); /* Text, data or lit */ |