size: Also obey radix printing for bsd format.

eu-size already prints according to the given radix for sysv format,
but not for the bsd format. Fix that.

Reported-by: Ulrich Drepper <drepper@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
This commit is contained in:
Mark Wielaard
2020-05-14 23:52:54 +02:00
parent 5d3b808238
commit c950815960
2 changed files with 9 additions and 2 deletions
+4
View File
@@ -1,3 +1,7 @@
2020-05-14 Mark Wielaard <mark@klomp.org>
* size.c (show_bsd): Set printf format based on radix.
2020-05-09 Mark Wielaard <mark@klomp.org>
* elflint.c (process_elf_file): Error out if ebl_openbackend fails.
+5 -2
View File
@@ -545,8 +545,11 @@ show_bsd (Elf *elf, const char *prefix, const char *fname,
datasize += shdr->sh_size;
}
printf ("%*" PRId64 " %*" PRId64 " %*" PRId64 " %*" PRId64 " %*"
PRIx64 " %s",
printf (radix == radix_decimal
? "%*" PRId64 " %*" PRId64 " %*" PRId64 " %*" PRId64 " %*" PRIx64 " %s"
: radix == radix_hex
? "%#*" PRIx64 " %#*" PRIx64 " %#*" PRIx64 " %*" PRId64 " %*" PRIx64 " %s"
: "%#*" PRIo64 " %#*" PRIo64 " %#*" PRIo64 " %*" PRId64 " %*" PRIx64 " %s",
ddigits - 2, textsize,
ddigits - 2, datasize,
ddigits - 2, bsssize,