aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorChristian Eggers <ceggers@gmx.de>2019-11-04 08:34:54 +0100
committerAlan Modra <amodra@gmail.com>2019-11-06 17:53:34 +1030
commitb0a7971ad46c265bd979b17eba3d97a9a63187eb (patch)
tree2819dfb1d04ecf0192b5b96aa21527854148b809 /ld
parent825165c57e43b25ef57c3cf2cc345ec6aa40a0d3 (diff)
downloadbinutils-b0a7971ad46c265bd979b17eba3d97a9a63187eb.zip
binutils-b0a7971ad46c265bd979b17eba3d97a9a63187eb.tar.gz
binutils-b0a7971ad46c265bd979b17eba3d97a9a63187eb.tar.bz2
ld: Fix printed sizes in map file
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.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog4
-rw-r--r--ld/ldlang.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 431e5b6..f3aa298 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -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),
diff --git a/ld/ldlang.c b/ld/ldlang.c
index df7f659..eedcb7f 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -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