Add new ld option: --print-memory-usage
authorTristan Gingold <gingold@adacore.com>
Fri, 5 Jun 2015 13:09:31 +0000 (15:09 +0200)
committerTristan Gingold <gingold@adacore.com>
Fri, 12 Jun 2015 09:24:36 +0000 (11:24 +0200)
commit3604cb1f8ca4a926039a9540d03bb224d84af3e1
tree962d40b3cb6bd43d06960653b70af6d73a207e66
parentdb7858e227f3951c665410314fca62c77349ac24
Add new ld option: --print-memory-usage

ld/
* NEWS: Mention new option.
* lexsup.c (parse_args): Handle --print-memory-usage.
(ld_options): Add --print-memory-usage.
* ldmain.c (main): Call lang_print_memory_usage.
* ldlex.h (enum option_values): Add OPTION_PRINT_MEMORY_USAGE.
* ldlang.h: Add prototype of lang_print_memory_usage.
* ldlang.c (lang_print_memory_size, lang_print_memory_usage): New
functions.
* ld.texinfo (Options): Document --print-memory-usage.
* ld.h (args_type): Add print_memory_usage field.

ld/testsuite/
* ld-scripts/print-memory-usage-1.t,
* ld-scripts/print-memory-usage-1.s,
* ld-scripts/print-memory-usage-1.l,
* ld-scripts/print-memory-usage-2.t,
* ld-scripts/print-memory-usage-2.l,
* ld-scripts/print-memory-usage-3.s,
* ld-scripts/print-memory-usage-3.t,
* ld-scripts/print-memory-usage-3.l,
* ld-scripts/print-memory-usage.t: New tests.
* ld-scripts/print-memory-usage.exp: Run them.
20 files changed:
ld/ChangeLog
ld/NEWS
ld/ld.h
ld/ld.texinfo
ld/ldlang.c
ld/ldlang.h
ld/ldlex.h
ld/ldmain.c
ld/lexsup.c
ld/testsuite/ChangeLog
ld/testsuite/ld-scripts/print-memory-usage-1.l [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-1.s [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-1.t [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-2.l [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-2.t [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-3.l [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-3.s [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage-3.t [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage.exp [new file with mode: 0644]
ld/testsuite/ld-scripts/print-memory-usage.t [new file with mode: 0644]