public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: Build all the objdump extensions with --enable-targets=all
Date: Wed, 19 Jul 2023 11:10:45 +0930	[thread overview]
Message-ID: <ZLc/HcP8ynwWNpO3@squeak.grove.modra.org> (raw)

Only the xcoff and pe extensions were enabled.  Build the lot, and fix
some more printf format problems when the host is 32-bit.

	* configure.ac (od_vectors): Set up for --enable-targets=all.
	* configure: Regenerate.
	* od-elf32_avr.c (elf32_avr_dump_mem_usage): Correct format
	specifier vs. arg mismatch.
	(elf32_avr_dump_avr_prop): Likewise.

diff --git a/binutils/configure b/binutils/configure
index 0e1c7dddbd9..c9641f3c7f9 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -14571,7 +14571,8 @@ do
 	fi
 	DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
 	BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
-	od_vectors="$od_vectors objdump_private_desc_xcoff objdump_private_desc_pe"
+	od_vectors="objdump_private_desc_elf32_avr objdump_private_desc_xcoff\
+		    objdump_private_desc_pe objdump_private_desc_mach_o"
     else
 	case $targ in
 	*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
diff --git a/binutils/configure.ac b/binutils/configure.ac
index b5798bf755f..92a23ae7df8 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -348,7 +348,8 @@ do
 	fi
 	DLLTOOL_DEFS="$DLLTOOL_DEFS -DDLLTOOL_I386"
 	BUILD_DLLWRAP='$(DLLWRAP_PROG)$(EXEEXT)'
-	od_vectors="$od_vectors objdump_private_desc_xcoff objdump_private_desc_pe"
+	od_vectors="objdump_private_desc_elf32_avr objdump_private_desc_xcoff\
+		    objdump_private_desc_pe objdump_private_desc_mach_o"
     else
 	case $targ in
 	*-*-hms*) BUILD_SRCONV='$(SRCONV_PROG)' ;;
diff --git a/binutils/od-elf32_avr.c b/binutils/od-elf32_avr.c
index cc24919160f..19da74a7c65 100644
--- a/binutils/od-elf32_avr.c
+++ b/binutils/od-elf32_avr.c
@@ -270,25 +270,26 @@ elf32_avr_dump_mem_usage (bfd *abfd)
           "Device: %s\n\n", device.name);
 
   /* Text size */
-  printf ("Program:%8lu bytes", text_usage);
+  printf ("Program:%8" PRIu64 " bytes", (uint64_t) text_usage);
   if (device.flash_size > 0)
-    printf (" (%2.1f%% Full)", ((float) text_usage / device.flash_size) * 100);
+    printf (" (%2.1f%% Full)", (double) text_usage / device.flash_size * 100);
 
   printf ("\n(.text + .data + .bootloader)\n\n");
 
   /* Data size */
-  printf ("Data:   %8lu bytes", data_usage);
+  printf ("Data:   %8" PRIu64 " bytes", (uint64_t) data_usage);
   if (device.ram_size > 0)
-    printf (" (%2.1f%% Full)", ((float) data_usage / device.ram_size) * 100);
+    printf (" (%2.1f%% Full)", (double) data_usage / device.ram_size * 100);
 
   printf ("\n(.data + .bss + .noinit)\n\n");
 
   /* EEPROM size */
   if (eeprom_usage > 0)
     {
-      printf ("EEPROM: %8lu bytes", eeprom_usage);
+      printf ("EEPROM: %8" PRIu64 " bytes", (uint64_t) eeprom_usage);
       if (device.eeprom_size > 0)
-        printf (" (%2.1f%% Full)", ((float) eeprom_usage / device.eeprom_size) * 100);
+	printf (" (%2.1f%% Full)",
+		(double) eeprom_usage / device.eeprom_size * 100);
 
       printf ("\n(.eeprom)\n\n");
     }
@@ -315,12 +316,12 @@ elf32_avr_dump_avr_prop (bfd *abfd)
 
   for (i = 0; i < r_list->record_count; ++i)
     {
-      printf ("   %d %s @ %s + %#08lx (%#08lx)\n",
+      printf ("   %d %s @ %s + %#08" PRIx64" (%#08" PRIx64 ")\n",
 	      i,
 	      avr_elf32_property_record_name (&r_list->records [i]),
 	      r_list->records [i].section->name,
-	      r_list->records [i].offset,
-	      (bfd_section_vma (r_list->records [i].section)
+	      (uint64_t) r_list->records [i].offset,
+	      ((uint64_t) bfd_section_vma (r_list->records [i].section)
 	       + r_list->records [i].offset));
       switch (r_list->records [i].type)
         {

-- 
Alan Modra
Australia Development Lab, IBM

                 reply	other threads:[~2023-07-19  1:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZLc/HcP8ynwWNpO3@squeak.grove.modra.org \
    --to=amodra@gmail.com \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).