ld: Fix printed sizes in map file
authorChristian Eggers <ceggers@gmx.de>
Mon, 4 Nov 2019 07:34:54 +0000 (08:34 +0100)
committerAlan Modra <amodra@gmail.com>
Wed, 6 Nov 2019 07:23:34 +0000 (17:53 +1030)
For targets with octets_per_byte > 1, testsuite/ld-scripts/rgn-over*
produce wrong sizes in the generated map files:

.text           0x0000000000001000        0x6
                                          ^^^ # correct
 *(.txt)
 .txt           0x0000000000001000        0xc tmpdir/rgn-over.o
                                          ^^^ # should also be 0x6

* ldlang.c (print_input_section): Shift printed size by opb_shift.

ld/ChangeLog
ld/ldlang.c

index 431e5b62b1fc9d502a5848f59ab5edc5b011cc91..f3aa29817fa8ebabf65d6f3ad6f84a4ee8ad19ba 100644 (file)
@@ -1,3 +1,7 @@
+2019-11-06  Christian Eggers  <ceggers@gmx.de>
+
+       * ldlang.c (print_input_section): Shift printed size by opb_shift.
+
 2019-11-05  Alan Modra  <amodra@gmail.com>
 
        * emulparams/aarch64elf.sh (GENERATE_SHLIB_SCRIPT),
index df7f65948636a24a1fd26602af65189e0a1a7dfb..eedcb7f4050c82b8cb12818551cc2a582fd3bcd2 100644 (file)
@@ -4653,7 +4653,7 @@ print_input_section (asection *i, bfd_boolean is_discarded)
        size = 0;
     }
 
-  minfo ("0x%V %W %pB\n", addr, size, i->owner);
+  minfo ("0x%V %W %pB\n", addr, TO_ADDR (size), i->owner);
 
   if (size != i->rawsize && i->rawsize != 0)
     {
@@ -4669,7 +4669,7 @@ print_input_section (asection *i, bfd_boolean is_discarded)
          --len;
        }
 
-      minfo (_("%W (size before relaxing)\n"), i->rawsize);
+      minfo (_("%W (size before relaxing)\n"), TO_ADDR (i->rawsize));
     }
 
   if (i->output_section != NULL
This page took 0.030819 seconds and 4 git commands to generate.