PR 25244
* ldlang.c (lang_print_memory_usage): Don't print percent used
when length is zero.
+2019-12-05 Alan Modra <amodra@gmail.com>
+
+ PR 25244
+ * ldlang.c (lang_print_memory_usage): Don't print percent used
+ when length is zero.
+
2019-11-27 Andrew Burgess <andrew.burgess@embecosm.com>
* testsuite/ld-elf/eh5.d: Accept version 3 DWARF CIE.
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%%\n", percent);
+ }
}
}