Automatic date update in version.in
[deliverable/binutils-gdb.git] / ld / ldlang.c
index 3bcab7a876e3036cf69c14daeeed0a0c7ef06845..05ea0c881f825d12bd7cd0e3117fd8cf02c9f2a6 100644 (file)
@@ -3442,16 +3442,16 @@ ldlang_open_output (lang_statement_union_type *statement)
 static void
 init_opb (asection *s)
 {
-  unsigned x = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
-                                             ldfile_output_machine);
-  if (s != NULL)
-    {
-      if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
-         && (s->flags & SEC_ELF_OCTETS))
-       x = 1;
-    }
+  unsigned int x;
 
   opb_shift = 0;
+  if (bfd_get_flavour (link_info.output_bfd) == bfd_target_elf_flavour
+      && s != NULL
+      && (s->flags & SEC_ELF_OCTETS) != 0)
+    return;
+
+  x = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+                                    ldfile_output_machine);
   if (x > 1)
     while ((x & 1) == 0)
       {
@@ -9273,14 +9273,16 @@ lang_print_memory_usage (void)
   for (r = lang_memory_region_list; r->next != NULL; r = r->next)
     {
       bfd_vma used_length = r->current - r->origin;
-      double percent;
 
       printf ("%16s: ",r->name_list.name);
       lang_print_memory_size (used_length);
       lang_print_memory_size ((bfd_vma) r->length);
 
-      percent = used_length * 100.0 / r->length;
-
-      printf ("    %6.2f%%\n", percent);
+      if (r->length != 0)
+       {
+         double percent = used_length * 100.0 / r->length;
+         printf ("    %6.2f%%", percent);
+       }
+      printf ("\n");
     }
 }
This page took 0.024934 seconds and 4 git commands to generate.