]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
ld: Print 0 size in B and not in GB
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Sun, 17 Dec 2023 21:16:08 +0000 (22:16 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 18 Dec 2023 12:32:14 +0000 (12:32 +0000)
commit8ea1e363b92243b0562e4a4a360a582e368884a8
treefe5334a34e98781f06919f222569194e60d3fa17
parent4cc1f41cfa45b0d36427e79409f447e83f4e66d4
ld: Print 0 size in B and not in GB

When using --print-memory-usage, the printed size can be zero and in
that case, the unit should be B and not GB.

ld/
* ldlang.c (lang_print_memory_size) Print 0 B instead of 0 GB.
* testsuite/ld-scripts/print-memory-usage-1.l: Validate emplty region.
* testsuite/ld-scripts/print-memory-usage-1.t: Define empty region.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
ld/ldlang.c
ld/testsuite/ld-scripts/print-memory-usage-1.l
ld/testsuite/ld-scripts/print-memory-usage-1.t