Make bfd_byte an int8_t, flagword a uint32_t
[binutils-gdb.git] / bfd / elf32-rx.c
index 6df021468b500f4c0b79c68ae0cf9aae741cd2af..d14c23831bdf7b3fb536cf8bdfe193c244911857 100644 (file)
@@ -1,5 +1,5 @@
 /* Renesas RX specific support for 32-bit ELF.
-   Copyright (C) 2008-2022 Free Software Foundation, Inc.
+   Copyright (C) 2008-2023 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -2038,8 +2038,9 @@ elf32_rx_relax_section (bfd *abfd,
      this section does not have relocs, or if this is not a
      code section.  */
   if (bfd_link_relocatable (link_info)
-      || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
+      || (sec->flags & SEC_RELOC) == 0
+      || (sec->flags & SEC_HAS_CONTENTS) == 0
       || (sec->flags & SEC_CODE) == 0)
     return true;
 
@@ -3972,16 +3973,17 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo)
 
   bfd_hash_traverse (&(info->info->hash->table), rx_table_map_2, info);
 
-  fprintf (info->mapfile, "\nRX Vector Table: %s has %d entries at 0x%08" BFD_VMA_FMT "x\n\n",
-          tname, info->table_size, start_addr);
+  fprintf (info->mapfile,
+          "\nRX Vector Table: %s has %d entries at 0x%08" PRIx64 "\n\n",
+          tname, info->table_size, (uint64_t) start_addr);
 
   if (info->table_default_entry)
-    fprintf (info->mapfile, "  default handler is: %s at 0x%08" BFD_VMA_FMT "x\n",
+    fprintf (info->mapfile, "  default handler is: %s at 0x%08" PRIx64 "\n",
             info->table_default_entry->root.string,
-            info->table_default_handler);
+            (uint64_t) info->table_default_handler);
   else if (info->table_default_handler != (bfd_vma)(-1))
-    fprintf (info->mapfile, "  default handler is at 0x%08" BFD_VMA_FMT "x\n",
-            info->table_default_handler);
+    fprintf (info->mapfile, "  default handler is at 0x%08" PRIx64 "\n",
+            (uint64_t) info->table_default_handler);
   else
     fprintf (info->mapfile, "  no default handler\n");
 
@@ -3997,7 +3999,8 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo)
        }
       need_elipses = 1;
 
-      fprintf (info->mapfile, "  0x%08" BFD_VMA_FMT "x [%3d] ", start_addr + 4 * idx, idx);
+      fprintf (info->mapfile,
+              "  0x%08" PRIx64 " [%3d] ", (uint64_t) start_addr + 4 * idx, idx);
 
       if (info->table_handlers[idx] == (bfd_vma) (-1))
        fprintf (info->mapfile, "(no handler found)\n");
@@ -4012,12 +4015,15 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo)
 
       else if (info->table_entries[idx])
        {
-         fprintf (info->mapfile, "0x%08" BFD_VMA_FMT "x %s\n", info->table_handlers[idx], info->table_entries[idx]->root.string);
+         fprintf (info->mapfile, "0x%08" PRIx64 " %s\n",
+                  (uint64_t) info->table_handlers[idx],
+                  info->table_entries[idx]->root.string);
        }
 
       else
        {
-         fprintf (info->mapfile, "0x%08" BFD_VMA_FMT "x ???\n", info->table_handlers[idx]);
+         fprintf (info->mapfile, "0x%08" PRIx64 " ???\n",
+                  (uint64_t) info->table_handlers[idx]);
        }
     }
   if (need_elipses)