From 5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 3 May 2021 23:27:16 -0400 Subject: 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. --- sim/erc32/ChangeLog | 4 ++++ sim/erc32/func.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/erc32') 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 + + * func.c (bfd_load): Use BFD_VMA_FMT. + 2021-05-01 Mike Frysinger * 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 */ -- cgit v1.2.1