aboutsummaryrefslogtreecommitdiff
path: root/binutils/NEWS
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-01-24 14:27:27 +0000
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-02-08 11:07:24 +0000
commit46cbf38dc3a7c6d0e339f95d56590711b06427a1 (patch)
tree361adf72cc40b99e01f6c73e6ce906ec9d52a38e /binutils/NEWS
parent482f3505d1b62cbcf46ffed54807fad0d91c8f09 (diff)
downloadgdb-46cbf38dc3a7c6d0e339f95d56590711b06427a1.zip
gdb-46cbf38dc3a7c6d0e339f95d56590711b06427a1.tar.gz
gdb-46cbf38dc3a7c6d0e339f95d56590711b06427a1.tar.bz2
binutils: Add new GNU format mode to `size` utility
The size tool currently defaults to berkeley format output. However, this output format has a weird quirk, read-only data is counted against the text sections, not the data sections. The code offers no real explanation for why this is, but I'm reluctant to change it for two reasons, first, I'm assuming it probably makes sense in some case that I'm not thinking of (maybe a target where sections are not marked executable, and so there's no distinction between read-only data and code), and second, the code has been this way for at least 20 years, I worry that changing things now might cause more confusion than it solves. This commit then introduces a new output format for the size tool, this new format displays the results in a similar manor to the berkeley format, but counts read-only data in the data column, and only executable sections are counted in the text column. Given that this is a brand new output format I've gone ahead and simplified things a little, while the berkeley format displays the total twice, once in decimal and once in hex, the new display format just displays the total in decimal. Of course, there's still the '--radix' option which can be used to display all the results in hexadecimal or octal. I've called the new format 'gnu', so '--format=gnu' or '-G' are used to access it. binutils/ChangeLog: * size.c (berkeley_format): Delete. (enum output_format): New enum. (selected_output_format): New variable. (usage): Update to mention GNU format. (main): Update to extract options, and select format as needed. Handle GNU format where needed. (berkeley_sum): Renamed to... (berkeley_or_gnu_sum): ...this, and updated to handle both formats. (berkeley_format): Renamed to... (berkeley_or_gnu_format): ...this, and updated to handle both formats. (print_sizes): Handle GNU format. * doc/binutils.texi (size): Document new GNU format. * testsuite/binutils-all/size.exp: Add test of extended functionality. * NEWS: Mention new functionality.
Diffstat (limited to 'binutils/NEWS')
-rw-r--r--binutils/NEWS5
1 files changed, 5 insertions, 0 deletions
diff --git a/binutils/NEWS b/binutils/NEWS
index 9ea8297..34fd9ec 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -33,6 +33,11 @@ Changes in 2.32:
3A1000 processor, The -march=loongson3a is an alias of -march=gs464 for
compatibility.
+* The size tool now has a new output format '--format=GNU' or '-G'. The
+ results are displayed in a similar manor to the default berkeley layout,
+ except read-only data is counted in the data column, not the text column.
+ Additionally the total is only included once.
+
Changes in 2.31:
* Add support for disassembling netronome Flow Processor (NFP) firmware files.